From 06a421e706f38c7de7ea6b627c01269d4273785f Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 5 Sep 2023 09:08:21 -0400 Subject: [PATCH] Fix signatures of string-attribute getters in Accessors.h/cpp. (#29029) The old signature did not propagate the update length of the span to the caller. This is a manual backport of #29024. The ZAP update is needed to get the right output. This modifies a few things, which were included in the PR so that the ZAP job would pass. The Darwin bits might not compile in this state, but that's OK. --- .../data_model/lighting-app-thread.matter | 2 +- .../data_model/lighting-app-wifi.matter | 2 +- .../log-source-common/log-source-app.matter | 1 + .../placeholder/linux/apps/app1/config.matter | 1 - .../placeholder/linux/apps/app2/config.matter | 1 - .../docker/images/chip-cert-bins/Dockerfile | 2 +- scripts/setup/zap.json | 2 +- scripts/tools/zap/zap_execution.py | 2 +- src/darwin/Framework/CHIP/MTRDefines.h | 6 + .../MTRAttributeTLVValueDecoder.mm | 3729 +- .../CHIP/zap-generated/MTRBaseClusters.h | 1680 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 13896 ++-- .../zap-generated/MTRBaseClusters_Internal.h | 35 + .../CHIP/zap-generated/MTRCallbackBridge.h | 3838 +- .../CHIP/zap-generated/MTRCallbackBridge.mm | 6574 +- .../CHIP/zap-generated/MTRClusterConstants.h | 160 + .../CHIP/zap-generated/MTRClusters.h | 441 + .../CHIP/zap-generated/MTRClusters.mm | 1595 + .../CHIP/zap-generated/MTRClusters_Internal.h | 35 + .../zap-generated/MTRCommandPayloadsObjc.h | 92 + .../zap-generated/MTRCommandPayloadsObjc.mm | 95 + .../zap-generated/MTREventTLVValueDecoder.mm | 70 + .../CHIP/zap-generated/MTRStructsObjc.h | 7 + .../CHIP/zap-generated/MTRStructsObjc.mm | 34 + .../zap-generated/attributes/Accessors.cpp | 68 +- .../zap-generated/attributes/Accessors.h | 68 +- .../tests/simulated-cluster-objects.h | 192 + .../zap-generated/cluster/Commands.h | 55194 +++++++++------- 28 files changed, 58638 insertions(+), 29184 deletions(-) diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 10d41625f70b25..676e719c46b107 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter @@ -2102,7 +2102,7 @@ endpoint 0 { } } endpoint 1 { - device type extendedcolorlight = 269, version 1; + device type extendedcolorlight = 257, version 1; server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index cd4d0833e0f95d..af1de50c02f56f 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter @@ -1963,7 +1963,7 @@ endpoint 0 { } } endpoint 1 { - device type extendedcolorlight = 269, version 1; + device type extendedcolorlight = 257, version 1; server cluster Identify { ram attribute identifyTime default = 0x0000; diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index 2ba2b4be9cf231..145199c532bb9d 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -475,6 +475,7 @@ server cluster OperationalCredentials = 62 { } endpoint 0 { + device type anonymousEndpointType = 0, version 1; binding cluster DiagnosticLogs; server cluster AccessControl { diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 368ed130bfe1c9..96b177894b6af3 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -3391,7 +3391,6 @@ server cluster ApplicationBasic = 1293 { } endpoint 0 { - device type anonymousEndpointType = 65280, version 1; binding cluster OnOff; binding cluster GeneralCommissioning; binding cluster Switch; diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 71f3160070bad4..7c6873bd73af16 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -3352,7 +3352,6 @@ server cluster ApplicationBasic = 1293 { } endpoint 0 { - device type anonymousEndpointType = 65280, version 1; binding cluster OnOff; binding cluster GeneralCommissioning; binding cluster Switch; diff --git a/integrations/docker/images/chip-cert-bins/Dockerfile b/integrations/docker/images/chip-cert-bins/Dockerfile index 3c096c3ac33e2c..792d04c807e930 100644 --- a/integrations/docker/images/chip-cert-bins/Dockerfile +++ b/integrations/docker/images/chip-cert-bins/Dockerfile @@ -7,7 +7,7 @@ ARG COMMITHASH=7b99e6399c6069037c613782d78132c69b9dcabb # ZAP Development install, so that it runs on both x64 and arm64 # Generally this should match with the ZAP version that is used for codegen within the # specified SHA -ARG ZAP_VERSION=v2023.04.27-nightly +ARG ZAP_VERSION=v2023.09.01-nightly # Ensure TARGETPLATFORM is set RUN case ${TARGETPLATFORM} in \ diff --git a/scripts/setup/zap.json b/scripts/setup/zap.json index 5877f6395570e0..4755f2c4373cf0 100644 --- a/scripts/setup/zap.json +++ b/scripts/setup/zap.json @@ -8,7 +8,7 @@ "mac-arm64", "windows-amd64" ], - "tags": ["version:2@v2023.04.27-nightly.1"] + "tags": ["version:2@v2023.09.01-nightly.1"] } ] } diff --git a/scripts/tools/zap/zap_execution.py b/scripts/tools/zap/zap_execution.py index 7ada169c086eb4..5dbff86656cd17 100644 --- a/scripts/tools/zap/zap_execution.py +++ b/scripts/tools/zap/zap_execution.py @@ -23,7 +23,7 @@ # Use scripts/tools/zap/version_update.py to manage ZAP versioning as many # files may need updating for versions # -MIN_ZAP_VERSION = '2023.4.27' +MIN_ZAP_VERSION = '2023.9.1' class ZapTool: diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index 2c6a4eea7dd6ed..09d459411c6400 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -51,6 +51,12 @@ #define MTR_NEWLY_AVAILABLE #endif +#if defined(MTR_ENABLE_PROVISIONAL) && MTR_ENABLE_PROVISIONAL +#define MTR_PROVISIONALLY_AVAILABLE MTR_NEWLY_AVAILABLE +#else +#define MTR_PROVISIONALLY_AVAILABLE NS_UNAVAILABLE MTR_HIDDEN +#endif + #pragma mark - Types typedef NSData * MTRTLVBytes; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index c656e1f7c89e5d..ffff6ab47460b8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -109,6 +109,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -229,6 +255,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -408,6 +460,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -576,6 +654,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -707,6 +811,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -994,6 +1124,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1202,6 +1358,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1256,11 +1438,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } break; } - case Clusters::Descriptor::Id: { - using namespace Clusters::Descriptor; + case Clusters::PulseWidthModulation::Id: { + using namespace Clusters::PulseWidthModulation; switch (aPath.mAttributeId) { - case Attributes::DeviceTypeList::Id: { - using TypeInfo = Attributes::DeviceTypeList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1272,10 +1454,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRDescriptorClusterDeviceTypeStruct * newElement_0; - newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; - newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; - newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1287,8 +1467,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::ServerList::Id: { - using TypeInfo = Attributes::ServerList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1313,8 +1493,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::ClientList::Id: { - using TypeInfo = Attributes::ClientList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1339,8 +1519,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::PartsList::Id: { - using TypeInfo = Attributes::PartsList::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1353,7 +1533,7 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1365,8 +1545,39 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::Descriptor::Id: { + using namespace Clusters::Descriptor; + switch (aPath.mAttributeId) { + case Attributes::DeviceTypeList::Id: { + using TypeInfo = Attributes::DeviceTypeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1378,8 +1589,10 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRDescriptorClusterDeviceTypeStruct * newElement_0; + newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; + newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; + newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1391,8 +1604,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::ServerList::Id: { + using TypeInfo = Attributes::ServerList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1417,8 +1630,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::ClientList::Id: { + using TypeInfo = Attributes::ClientList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1443,19 +1656,149 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::PartsList::Id: { + using TypeInfo = Attributes::PartsList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -1573,6 +1916,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -1827,6 +2196,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2028,6 +2423,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2376,6 +2797,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2485,8 +2932,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -2511,28 +2958,54 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; @@ -2660,6 +3133,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2808,6 +3307,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -2965,6 +3490,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3085,6 +3636,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3220,6 +3797,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3747,6 +4350,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -3913,6 +4542,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -4139,6 +4794,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -4248,8 +4929,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -4274,30 +4955,56 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; break; } break; @@ -4567,6 +5274,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -4758,6 +5491,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -5721,6 +6480,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6025,6 +6810,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6245,6 +7056,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6299,95 +7136,404 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } break; } - case Clusters::BridgedDeviceBasicInformation::Id: { - using namespace Clusters::BridgedDeviceBasicInformation; + case Clusters::TimeSynchronization::Id: { + using namespace Clusters::TimeSynchronization; switch (aPath.mAttributeId) { - case Attributes::VendorName::Id: { - using TypeInfo = Attributes::VendorName::TypeInfo; + case Attributes::UTCTime::Id: { + using TypeInfo = Attributes::UTCTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } - case Attributes::VendorID::Id: { - using TypeInfo = Attributes::VendorID::TypeInfo; + case Attributes::Granularity::Id: { + using TypeInfo = Attributes::Granularity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ProductName::Id: { - using TypeInfo = Attributes::ProductName::TypeInfo; + case Attributes::TimeSource::Id: { + using TypeInfo = Attributes::TimeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::NodeLabel::Id: { - using TypeInfo = Attributes::NodeLabel::TypeInfo; + case Attributes::TrustedTimeNodeId::Id: { + using TypeInfo = Attributes::TrustedTimeNodeId::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } return value; } - case Attributes::HardwareVersion::Id: { - using TypeInfo = Attributes::HardwareVersion::TypeInfo; + case Attributes::DefaultNtp::Id: { + using TypeInfo = Attributes::DefaultNtp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSString * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [[NSString alloc] initWithBytes:cppValue.Value().data() + length:cppValue.Value().size() + encoding:NSUTF8StringEncoding]; + } return value; } - case Attributes::HardwareVersionString::Id: { - using TypeInfo = Attributes::HardwareVersionString::TypeInfo; + case Attributes::TimeZone::Id: { + using TypeInfo = Attributes::TimeZone::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::SoftwareVersion::Id: { - using TypeInfo = Attributes::SoftwareVersion::TypeInfo; + case Attributes::DSTOffset::Id: { + using TypeInfo = Attributes::DSTOffset::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; + newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::SoftwareVersionString::Id: { - using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; + case Attributes::LocalTime::Id: { + using TypeInfo = Attributes::LocalTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSString * _Nonnull value; - value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + } + return value; + } + case Attributes::TimeZoneDatabase::Id: { + using TypeInfo = Attributes::TimeZoneDatabase::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::NtpServerPort::Id: { + using TypeInfo = Attributes::NtpServerPort::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::BridgedDeviceBasicInformation::Id: { + using namespace Clusters::BridgedDeviceBasicInformation; + switch (aPath.mAttributeId) { + case Attributes::VendorName::Id: { + using TypeInfo = Attributes::VendorName::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::VendorID::Id: { + using TypeInfo = Attributes::VendorID::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::ProductName::Id: { + using TypeInfo = Attributes::ProductName::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::NodeLabel::Id: { + using TypeInfo = Attributes::NodeLabel::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::HardwareVersion::Id: { + using TypeInfo = Attributes::HardwareVersion::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::HardwareVersionString::Id: { + using TypeInfo = Attributes::HardwareVersionString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; + return value; + } + case Attributes::SoftwareVersion::Id: { + using TypeInfo = Attributes::SoftwareVersion::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::SoftwareVersionString::Id: { + using TypeInfo = Attributes::SoftwareVersionString::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSString * _Nonnull value; + value = [[NSString alloc] initWithBytes:cppValue.data() length:cppValue.size() encoding:NSUTF8StringEncoding]; return value; } case Attributes::ManufacturingDate::Id: { @@ -6536,8 +7682,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6562,14 +7708,40 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } @@ -6622,12 +7794,713 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::AdministratorCommissioning::Id: { + using namespace Clusters::AdministratorCommissioning; + switch (aPath.mAttributeId) { + case Attributes::WindowStatus::Id: { + using TypeInfo = Attributes::WindowStatus::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::AdminFabricIndex::Id: { + using TypeInfo = Attributes::AdminFabricIndex::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::AdminVendorId::Id: { + using TypeInfo = Attributes::AdminVendorId::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + } + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::OperationalCredentials::Id: { + using namespace Clusters::OperationalCredentials; + switch (aPath.mAttributeId) { + case Attributes::NOCs::Id: { + using TypeInfo = Attributes::NOCs::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; + newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; + if (entry_0.icac.IsNull()) { + newElement_0.icac = nil; + } else { + newElement_0.icac = [NSData dataWithBytes:entry_0.icac.Value().data() length:entry_0.icac.Value().size()]; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::Fabrics::Id: { + using TypeInfo = Attributes::Fabrics::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; + newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() + length:entry_0.rootPublicKey.size()]; + newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; + newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; + newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::SupportedFabrics::Id: { + using TypeInfo = Attributes::SupportedFabrics::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::CommissionedFabrics::Id: { + using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::TrustedRootCertificates::Id: { + using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::CurrentFabricIndex::Id: { + using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::GroupKeyManagement::Id: { + using namespace Clusters::GroupKeyManagement; + switch (aPath.mAttributeId) { + case Attributes::GroupKeyMap::Id: { + using TypeInfo = Attributes::GroupKeyMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::GroupTable::Id: { + using TypeInfo = Attributes::GroupTable::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.endpoints = array_2; + } + if (entry_0.groupName.HasValue()) { + newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() + length:entry_0.groupName.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.groupName = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::MaxGroupsPerFabric::Id: { + using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::MaxGroupKeysPerFabric::Id: { + using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6652,8 +8525,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6732,52 +8605,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } break; } - case Clusters::AdministratorCommissioning::Id: { - using namespace Clusters::AdministratorCommissioning; + case Clusters::FixedLabel::Id: { + using namespace Clusters::FixedLabel; switch (aPath.mAttributeId) { - case Attributes::WindowStatus::Id: { - using TypeInfo = Attributes::WindowStatus::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; - return value; - } - case Attributes::AdminFabricIndex::Id: { - using TypeInfo = Attributes::AdminFabricIndex::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; - } - return value; - } - case Attributes::AdminVendorId::Id: { - using TypeInfo = Attributes::AdminVendorId::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; - } - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::LabelList::Id: { + using TypeInfo = Attributes::LabelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6789,8 +8621,14 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRFixedLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRFixedLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6802,8 +8640,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6828,8 +8666,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6854,39 +8692,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } - case Clusters::OperationalCredentials::Id: { - using namespace Clusters::OperationalCredentials; - switch (aPath.mAttributeId) { - case Attributes::NOCs::Id: { - using TypeInfo = Attributes::NOCs::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6898,15 +8705,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterNOCStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; - newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; - if (entry_0.icac.IsNull()) { - newElement_0.icac = nil; - } else { - newElement_0.icac = [NSData dataWithBytes:entry_0.icac.Value().data() length:entry_0.icac.Value().size()]; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6918,8 +8718,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::Fabrics::Id: { - using TypeInfo = Attributes::Fabrics::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6931,17 +8731,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; - newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() - length:entry_0.rootPublicKey.size()]; - newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; - newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; - newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6953,30 +8744,39 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::SupportedFabrics::Id: { - using TypeInfo = Attributes::SupportedFabrics::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::CommissionedFabrics::Id: { - using TypeInfo = Attributes::CommissionedFabrics::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::TrustedRootCertificates::Id: { - using TypeInfo = Attributes::TrustedRootCertificates::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::UserLabel::Id: { + using namespace Clusters::UserLabel; + switch (aPath.mAttributeId) { + case Attributes::LabelList::Id: { + using TypeInfo = Attributes::LabelList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -6988,8 +8788,14 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + MTRUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRUserLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7001,17 +8807,6 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::CurrentFabricIndex::Id: { - using TypeInfo = Attributes::CurrentFabricIndex::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7064,8 +8859,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AttributeList::Id: { - using TypeInfo = Attributes::AttributeList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7090,68 +8885,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::FeatureMap::Id: { - using TypeInfo = Attributes::FeatureMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; - return value; - } - case Attributes::ClusterRevision::Id: { - using TypeInfo = Attributes::ClusterRevision::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; - return value; - } - default: - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - break; - } - break; - } - case Clusters::GroupKeyManagement::Id: { - using namespace Clusters::GroupKeyManagement; - switch (aPath.mAttributeId) { - case Attributes::GroupKeyMap::Id: { - using TypeInfo = Attributes::GroupKeyMap::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = cppValue.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - value = array_0; - } - return value; - } - case Attributes::GroupTable::Id: { - using TypeInfo = Attributes::GroupTable::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7163,33 +8898,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - *aError = err; - return nil; - } - newElement_0.endpoints = array_2; - } - if (entry_0.groupName.HasValue()) { - newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() - length:entry_0.groupName.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.groupName = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7201,19 +8911,19 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::MaxGroupsPerFabric::Id: { - using TypeInfo = Attributes::MaxGroupsPerFabric::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::MaxGroupKeysPerFabric::Id: { - using TypeInfo = Attributes::MaxGroupKeysPerFabric::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7223,6 +8933,15 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::ProxyConfiguration::Id: { + using namespace Clusters::ProxyConfiguration; + switch (aPath.mAttributeId) { case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7275,6 +8994,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7329,11 +9074,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } break; } - case Clusters::FixedLabel::Id: { - using namespace Clusters::FixedLabel; + case Clusters::ProxyDiscovery::Id: { + using namespace Clusters::ProxyDiscovery; switch (aPath.mAttributeId) { - case Attributes::LabelList::Id: { - using TypeInfo = Attributes::LabelList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7345,14 +9090,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRFixedLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRFixedLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7364,8 +9103,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7390,8 +9129,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7470,11 +9209,11 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } break; } - case Clusters::UserLabel::Id: { - using namespace Clusters::UserLabel; + case Clusters::ProxyValid::Id: { + using namespace Clusters::ProxyValid; switch (aPath.mAttributeId) { - case Attributes::LabelList::Id: { - using TypeInfo = Attributes::LabelList::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7486,14 +9225,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & auto iter_0 = cppValue.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRUserLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -7505,8 +9238,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7531,8 +9264,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -7677,6 +9410,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -7901,6 +9660,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8414,6 +10199,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -8797,6 +10608,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9016,6 +10853,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -9394,12 +11257,38 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -9424,8 +11313,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10142,6 +12031,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10380,6 +12295,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -10522,6 +12463,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11247,6 +13214,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11530,6 +13523,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11710,6 +13729,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -11875,6 +13920,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12107,6 +14178,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12272,6 +14369,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12411,8 +14534,34 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -12678,6 +14827,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -12798,6 +14973,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13027,6 +15228,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13177,6 +15404,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13389,6 +15642,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13543,6 +15822,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13652,6 +15957,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13761,6 +16092,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13909,6 +16266,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -13997,19 +16380,45 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::CurrentOutput::Id: { - using TypeInfo = Attributes::CurrentOutput::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; - return value; - } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::CurrentOutput::Id: { + using TypeInfo = Attributes::CurrentOutput::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -14034,8 +16443,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -14220,6 +16629,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -14436,6 +16871,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -14545,6 +17006,32 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; @@ -15918,34 +18405,215 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::PowerFactorPhaseC::Id: { + using TypeInfo = Attributes::PowerFactorPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithChar:cppValue]; + return value; + } + case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { + using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::RmsVoltageSagPeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { + using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::PowerFactorPhaseC::Id: { - using TypeInfo = Attributes::PowerFactorPhaseC::TypeInfo; + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithChar:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsVoltageMeasurementPeriodPhaseC::TypeInfo; + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::AverageRmsOverVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsOverVoltageCounterPhaseC::TypeInfo; + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15955,30 +18623,39 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::AverageRmsUnderVoltageCounterPhaseC::Id: { - using TypeInfo = Attributes::AverageRmsUnderVoltageCounterPhaseC::TypeInfo; + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::ClientMonitoring::Id: { + using namespace Clusters::ClientMonitoring; + switch (aPath.mAttributeId) { + case Attributes::IdleModeInterval::Id: { + using TypeInfo = Attributes::IdleModeInterval::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::RmsExtremeOverVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeOverVoltagePeriodPhaseC::TypeInfo; + case Attributes::ActiveModeInterval::Id: { + using TypeInfo = Attributes::ActiveModeInterval::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } - case Attributes::RmsExtremeUnderVoltagePeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsExtremeUnderVoltagePeriodPhaseC::TypeInfo; + case Attributes::ActiveModeThreshold::Id: { + using TypeInfo = Attributes::ActiveModeThreshold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -15988,30 +18665,63 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & value = [NSNumber numberWithUnsignedShort:cppValue]; return value; } - case Attributes::RmsVoltageSagPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSagPeriodPhaseC::TypeInfo; + case Attributes::ExpectedClients::Id: { + using TypeInfo = Attributes::ExpectedClients::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRClientMonitoringClusterMonitoringRegistration * newElement_0; + newElement_0 = [MTRClientMonitoringClusterMonitoringRegistration new]; + newElement_0.clientNodeId = [NSNumber numberWithUnsignedLongLong:entry_0.clientNodeId]; + newElement_0.iCid = [NSNumber numberWithUnsignedLongLong:entry_0.ICid]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::RmsVoltageSwellPeriodPhaseC::Id: { - using TypeInfo = Attributes::RmsVoltageSwellPeriodPhaseC::TypeInfo; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } return value; } - case Attributes::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -16036,8 +18746,8 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } - case Attributes::AcceptedCommandList::Id: { - using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -17546,6 +20256,167 @@ id MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader & } return value; } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AttributeList::Id: { + using TypeInfo = Attributes::AttributeList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::ClusterRevision::Id: { + using TypeInfo = Attributes::ClusterRevision::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue]; + return value; + } + default: + *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; + break; + } + break; + } + case Clusters::FaultInjection::Id: { + using namespace Clusters::FaultInjection; + switch (aPath.mAttributeId) { + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::AcceptedCommandList::Id: { + using TypeInfo = Attributes::AcceptedCommandList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::EventList::Id: { + using TypeInfo = Attributes::EventList::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = cppValue.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } case Attributes::AttributeList::Id: { using TypeInfo = Attributes::AttributeList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index f55d7231050d42..c58e19e32ec929 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -109,6 +109,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -257,6 +269,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -505,6 +529,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -728,6 +764,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -842,6 +890,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1217,6 +1277,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1451,6 +1523,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1493,6 +1577,96 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Pulse Width Modulation + * + * Cluster to control pulse width modulation + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterPulseWidthModulation : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Descriptor * @@ -1583,6 +1757,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1686,6 +1872,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -1858,6 +2056,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2068,6 +2278,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2441,6 +2663,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2551,6 +2785,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2703,6 +2949,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2821,6 +3079,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -2961,6 +3231,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3067,6 +3349,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3162,6 +3456,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3656,6 +3962,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -3853,6 +4171,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4103,6 +4433,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4196,6 +4538,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4407,6 +4761,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -4555,6 +4921,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -5474,6 +5852,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -5734,6 +6124,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -5935,6 +6337,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -5978,32 +6392,271 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end /** - * Cluster Bridged Device Basic Information + * Cluster Time Synchronization * - * This Cluster serves two purposes towards a Node communicating with a Bridge: indicate that the functionality on - the Endpoint where it is placed (and its Parts) is bridged from a non-CHIP technology; and provide a centralized - collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, - such as the vendor name, the model name, or user-assigned name. + * Accurate time is required for a number of reasons, including scheduling, display and validating +security materials. */ -API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) -@interface MTRBaseClusterBridgedDeviceBasicInformation : MTRCluster +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterTimeSynchronization : MTRCluster - (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params +/** + * Command SetUtcTime + * + * Upon receipt of this command, the server MAY update its UTCTime Attribute to match the time specified in the command + */ +- (void)setUtcTimeWithParams:(MTRTimeSynchronizationClusterSetUtcTimeParams *)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion - API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTrustedTimeNodeIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSNumber * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTrustedTimeNodeIdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTrustedTimeNodeIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDefaultNtpWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultNtpWithValue:(NSString * _Nullable)value + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultNtpWithValue:(NSString * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDefaultNtpWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDefaultNtpWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeZoneWithValue:(NSArray * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeZoneWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDSTOffsetWithValue:(NSArray * _Nonnull)value + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDSTOffsetWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNtpServerPortWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNtpServerPortWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNtpServerPortWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Bridged Device Basic Information + * + * This Cluster serves two purposes towards a Node communicating with a Bridge: indicate that the functionality on + the Endpoint where it is placed (and its Parts) is bridged from a non-CHIP technology; and provide a centralized + collection of attributes that the Node MAY collect to aid in conveying information regarding the Bridged Device to a user, + such as the vendor name, the model name, or user-assigned name. + */ +API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) +@interface MTRBaseClusterBridgedDeviceBasicInformation : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); ++ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -6233,6 +6886,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6359,6 +7024,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6509,6 +7186,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6747,6 +7436,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -6924,6 +7625,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7020,6 +7733,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7122,6 +7847,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7164,6 +7901,276 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Proxy Configuration + * + * Cluster to control Proxy Configuration + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterProxyConfiguration : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Proxy Discovery + * + * Cluster to control Proxy Discovery + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterProxyDiscovery : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Proxy Valid + * + * Cluster to control Proxy Valid + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterProxyValid : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Boolean State * @@ -7217,6 +8224,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -7396,6 +8415,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -8252,6 +9283,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -8716,6 +9759,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -8999,6 +10054,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -9400,6 +10467,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -10392,6 +11471,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -10650,6 +11741,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -10797,6 +11900,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -11781,6 +12896,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12114,6 +13241,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12260,6 +13399,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12393,6 +13544,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12587,6 +13750,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12720,6 +13895,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -12853,6 +14040,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -13191,6 +14390,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -13286,6 +14497,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -13439,6 +14662,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -13556,6 +14791,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -13849,6 +15096,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -13990,6 +15249,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14082,6 +15353,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14174,6 +15457,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14310,6 +15605,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14433,6 +15740,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14579,6 +15898,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14766,6 +16097,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -14881,6 +16224,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -16827,6 +18182,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -16869,6 +18236,168 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Client Monitoring + * + * Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterClientMonitoring : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +/** + * Command RegisterClientMonitoring + * + * Register a client to the end device + */ +- (void)registerClientMonitoringWithParams:(MTRClientMonitoringClusterRegisterClientMonitoringParams *)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command UnregisterClientMonitoring + * + * Unregister a client from an end device + */ +- (void)unregisterClientMonitoringWithParams:(MTRClientMonitoringClusterUnregisterClientMonitoringParams *)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command StayAwakeRequest + * + * Request the end device to stay in Active Mode for an additional ActiveModeThreshold + */ +- (void)stayAwakeRequestWithParams:(MTRClientMonitoringClusterStayAwakeRequestParams * _Nullable)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayAwakeRequestWithCompletion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeIdleModeIntervalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeIdleModeIntervalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeActiveModeIntervalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActiveModeIntervalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeExpectedClientsWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeExpectedClientsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeExpectedClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Unit Testing * @@ -18759,6 +20288,18 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params @@ -18801,6 +20342,111 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @end +/** + * Cluster Fault Injection + * + * The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the system). + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRBaseClusterFaultInjection : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +/** + * Command FailAtFault + * + * Configure a fault to be triggered deterministically + */ +- (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command FailRandomlyAtFault + * + * Configure a fault to be triggered randomly, with a given probability defined as a percentage + */ +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + MTR_DEPRECATED("Please use MTRBaseClusterBasicInformation", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRBaseClusterBasic : MTRBaseClusterBasicInformation @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 9feecb955c4311..c9f2a1b83206a2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -344,6 +344,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Identify::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Identify::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRIdentifyEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(IdentifyEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Identify::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -1194,6 +1237,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Groups::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Groups::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRGroupsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(GroupsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Groups::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -2532,6 +2618,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Scenes::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Scenes::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRScenesEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(ScenesEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Scenes::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -3918,6 +4047,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOff::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOff::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROnOffEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(OnOffEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOff::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -4795,6 +4967,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OnOffSwitchConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -6644,6 +6859,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLevelControlEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(LevelControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -8441,6 +8699,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRBinaryInputBasicEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BinaryInputBasicEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BinaryInputBasic::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -9247,6 +9548,288 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end +@implementation MTRBaseClusterPulseWidthModulation + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PulseWidthModulationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PulseWidthModulation::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PulseWidthModulationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PulseWidthModulation::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPulseWidthModulationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PulseWidthModulationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PulseWidthModulation::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPulseWidthModulationAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PulseWidthModulationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PulseWidthModulation::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PulseWidthModulation::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PulseWidthModulation::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + @implementation MTRBaseClusterDescriptor - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue @@ -9524,6 +10107,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRDescriptorEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(DescriptorEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Descriptor::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -10275,6 +10901,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Binding::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Binding::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRBindingEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(BindingEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Binding::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -11216,6 +11885,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAccessControlEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(AccessControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccessControl::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -12541,6 +13253,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Actions::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Actions::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRActionsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(ActionsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Actions::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -14265,6 +15020,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRBasicInformationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BasicInformationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BasicInformation::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -15795,6 +16593,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OTASoftwareUpdateProviderEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -16578,6 +17419,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OTASoftwareUpdateRequestorEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -17369,6 +18253,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLocalizationConfigurationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(LocalizationConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -18143,6 +19070,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeFormatLocalizationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -18842,6 +19812,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRUnitLocalizationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(UnitLocalizationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -19406,6 +20419,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PowerSourceConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -21286,6 +22342,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPowerSourceEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(PowerSourceEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -23504,6 +24603,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRGeneralCommissioningEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(GeneralCommissioningEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -24896,6 +26038,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNetworkCommissioningEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(NetworkCommissioningEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -25834,6 +27019,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRDiagnosticLogsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(DiagnosticLogsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -26747,6 +27975,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(GeneralDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -27831,6 +29102,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(SoftwareDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -31308,6 +32622,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ThreadNetworkDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -35196,6 +36553,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WiFiNetworkDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -36668,6 +38068,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(EthernetNetworkDiagnosticsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -37427,7 +38870,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterBridgedDeviceBasicInformation +@implementation MTRBaseClusterTimeSynchronization - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -37442,35 +38885,164 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)setUtcTimeWithParams:(MTRTimeSynchronizationClusterSetUtcTimeParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + TimeSynchronization::Commands::SetUtcTime::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.utcTime = params.utcTime.unsignedLongLongValue; + request.granularity + = static_cast>(params.granularity.unsignedCharValue); + if (params.timeSource != nil) { + auto & definedValue_0 = request.timeSource.Emplace(); + definedValue_0 + = static_cast>(params.timeSource.unsignedCharValue); + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRTimeSynchronizationClusterGranularityEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationClusterGranularityEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTimeSynchronizationClusterTimeSourceEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationClusterTimeSourceEnumAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37485,35 +39057,78 @@ + (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTrustedTimeNodeIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeNodeId::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeTrustedTimeNodeIdWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSNumber * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeNodeId::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedLongLongValue; + } + + chip::Controller::TimeSynchronizationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeTrustedTimeNodeIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeNodeId::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTrustedTimeNodeIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRVendorIdAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(VendorIdAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeNodeId::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37528,35 +39143,77 @@ + (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContaine }); } -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultNtpWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::DefaultNtp::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeDefaultNtpWithValue:(NSString * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; - MTRSubscribeAttribute(params, + [self writeAttributeDefaultNtpWithValue:(NSString * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultNtpWithValue:(NSString * _Nullable)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TimeSynchronization::Attributes::DefaultNtp::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = [self asCharSpan:value]; + } + + chip::Controller::TimeSynchronizationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultNtpWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::DefaultNtp::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultNtpWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableCharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DefaultNtp::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37571,19 +39228,125 @@ + (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheConta }); } -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTimeZoneWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTimeZoneWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value +- (void)writeAttributeTimeZoneWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTimeSynchronizationClusterTimeZoneStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTimeSynchronizationClusterTimeZoneStruct *) value[i_0]; + listHolder_0->mList[i_0].offset = element_0.offset.intValue; + listHolder_0->mList[i_0].validAt = element_0.validAt.unsignedLongLongValue; + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + definedValue_2 = [self asCharSpan:element_0.name]; + } + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::TimeSynchronizationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationTimeZoneListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeDSTOffsetWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDSTOffsetWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDSTOffsetWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { @@ -37606,37 +39369,60 @@ - (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value } ListFreer listFreer; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; TypeInfo::Type cppValue; - cppValue = [self asCharSpan:value]; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRTimeSynchronizationClusterDSTOffsetStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRTimeSynchronizationClusterDSTOffsetStruct *) value[i_0]; + listHolder_0->mList[i_0].offset = element_0.offset.intValue; + listHolder_0->mList[i_0].validStarting = element_0.validStarting.unsignedLongLongValue; + listHolder_0->mList[i_0].validUntil = element_0.validUntil.unsignedLongLongValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } - chip::Controller::BridgedDeviceBasicInformationCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::TimeSynchronizationCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationDSTOffsetListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37651,36 +39437,35 @@ + (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt64uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt64uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37695,37 +39480,36 @@ + (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37740,36 +39524,35 @@ + (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterState }); } -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNtpServerPortWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::NtpServerPort::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNtpServerPortWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TimeSynchronization::Attributes::NtpServerPort::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNtpServerPortWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::NtpServerPort::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37784,37 +39567,38 @@ + (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37829,36 +39613,37 @@ + (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterState }); } -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37873,35 +39658,35 @@ + (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRTimeSynchronizationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37916,35 +39701,78 @@ + (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRTimeSynchronizationAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TimeSynchronizationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -37959,35 +39787,36 @@ + (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; - return MTRReadAttribute( + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38002,35 +39831,52 @@ + (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterBridgedDeviceBasicInformation + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38045,35 +39891,35 @@ + (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRVendorIdAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(VendorIdAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38088,35 +39934,35 @@ + (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38131,45 +39977,72 @@ + (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContaine }); } -- (void)readAttributeProductAppearanceWithCompletion: - (void (^)( - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)( - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, - reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -+ (void) - readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)( - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, - NSError * _Nullable error))completion + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = [self asCharSpan:value]; + + chip::Controller::BridgedDeviceBasicInformationCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - auto * bridge = new MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BridgedDeviceBasicInformationProductAppearanceStructAttributeCallback successCb, MTRErrorCallback failureCb) { + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38184,38 +40057,36 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BridgedDeviceBasicInformationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38230,38 +40101,37 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BridgedDeviceBasicInformationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38276,36 +40146,36 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(BridgedDeviceBasicInformationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38320,35 +40190,37 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38363,36 +40235,36 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -38407,424 +40279,599 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterBridgedDeviceBasic -@end - -@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeVendorNameWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeVendorIDWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeProductNameWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductNameWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNodeLabelWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRBooleanAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(BooleanAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeHardwareVersionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeHardwareVersionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRCharStringAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(CharStringAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeProductAppearanceWithCompletion: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeHardwareVersionStringWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))reportHandler { - [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, + reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void) + readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, + NSError * _Nullable error))completion { - [self readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BridgedDeviceBasicInformationProductAppearanceStructAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSoftwareVersionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSoftwareVersionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BridgedDeviceBasicInformationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSoftwareVersionStringWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BridgedDeviceBasicInformationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeManufacturingDateWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BridgedDeviceBasicInformationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributePartNumberWithCompletionHandler:(void (^)( +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BridgedDeviceBasicInformationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterBridgedDeviceBasic +@end + +@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) + +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)( NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler @@ -38837,19 +40884,19 @@ - (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePartNumberWithParams:subscribeParams + [self subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. reportHandler(static_cast(value), error); }]; } -+ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion:^(NSString * _Nullable value, NSError * _Nullable error) { @@ -38858,19 +40905,19 @@ + (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *) }]; } -- (void)readAttributeProductURLWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeVendorIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -38879,14 +40926,416 @@ - (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeProductURLWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeVendorIDWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIDWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeProductNameWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeProductNameWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNodeLabelWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeHardwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeHardwareVersionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeHardwareVersionStringWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSoftwareVersionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSoftwareVersionStringWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeManufacturingDateWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePartNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePartNumberWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeProductURLWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeProductURLWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler @@ -38899,63 +41348,1751 @@ + (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *) completionHandler(static_cast(value), error); }]; } - -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeProductLabelWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSerialNumberWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeReachableWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReachableWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( + NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUniqueIDWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterSwitch + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(SwitchGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(SwitchAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRSwitchEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(SwitchEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(SwitchAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterSwitch (Deprecated) + +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNumberOfPositionsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfPositionsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeCurrentPositionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMultiPressMaxWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMultiPressMaxWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterAdministratorCommissioning + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; + request.PAKEPasscodeVerifier = [self asByteSpan:params.pakePasscodeVerifier]; + request.discriminator = params.discriminator.unsignedShortValue; + request.iterations = params.iterations.unsignedIntValue; + request.salt = [self asByteSpan:params.salt]; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion +{ + [self revokeCommissioningWithParams:nil completion:completion]; +} +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + AdministratorCommissioning::Commands::RevokeCommissioning::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + if (!timedInvokeTimeoutMs.HasValue()) { + timedInvokeTimeoutMs.SetValue(10000); + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, + self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(AdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(AdministratorCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(AdministratorCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAdministratorCommissioningEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(AdministratorCommissioningEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(AdministratorCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) + +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self openCommissioningWindowWithParams:params completion:completionHandler]; +} +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self openBasicCommissioningWindowWithParams:params completion:completionHandler]; } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductLabelWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self revokeCommissioningWithParams:params completion:completionHandler]; } -+ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval +- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -38964,41 +43101,42 @@ - (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSerialNumberWithParams:subscribeParams + [self subscribeAttributeWindowStatusWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeWindowStatusWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeReachableWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -39007,40 +43145,42 @@ - (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeReachableWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAdminFabricIndexWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeReachableWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAdminFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)( - NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -39049,25 +43189,26 @@ - (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUniqueIDWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAdminVendorIdWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAdminVendorIdWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -39289,58 +43430,445 @@ + (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContain }]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterOperationalCredentials + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + OperationalCredentialsClusterAttestationResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::AttestationRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.attestationNonce = [self asByteSpan:params.attestationNonce]; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + OperationalCredentialsClusterCertificateChainResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::CertificateChainRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.certificateType + = static_cast>(params.certificateType.unsignedCharValue); + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + OperationalCredentialsClusterCSRResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::CSRRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.CSRNonce = [self asByteSpan:params.csrNonce]; + if (params.isForUpdateNOC != nil) { + auto & definedValue_0 = request.isForUpdateNOC.Emplace(); + definedValue_0 = params.isForUpdateNOC.boolValue; + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::AddNOC::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.NOCValue = [self asByteSpan:params.nocValue]; + if (params.icacValue != nil) { + auto & definedValue_0 = request.ICACValue.Emplace(); + definedValue_0 = [self asByteSpan:params.icacValue]; + } + request.IPKValue = [self asByteSpan:params.ipkValue]; + request.caseAdminSubject = params.caseAdminSubject.unsignedLongLongValue; + request.adminVendorId + = static_cast>(params.adminVendorId.unsignedShortValue); + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::UpdateNOC::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.NOCValue = [self asByteSpan:params.nocValue]; + if (params.icacValue != nil) { + auto & definedValue_0 = request.ICACValue.Emplace(); + definedValue_0 = [self asByteSpan:params.icacValue]; + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::UpdateFabricLabel::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.label = [self asCharSpan:params.label]; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::RemoveFabric::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.fabricIndex = params.fabricIndex.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -@end ++ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OperationalCredentialsNOCsListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} -@implementation MTRBaseClusterSwitch +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; ++ (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OperationalCredentialsFabricsListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39355,36 +43883,37 @@ + (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCach }); } -- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39399,35 +43928,84 @@ + (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheC }); } -- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completion +{ + auto * bridge = new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OperationalCredentialsTrustedRootCertificatesListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39445,8 +44023,9 @@ + (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39455,10 +44034,10 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -39467,12 +44046,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSwitchGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SwitchGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(OperationalCredentialsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39490,8 +44069,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39500,10 +44080,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -39512,12 +44092,55 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSwitchAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(SwitchAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(OperationalCredentialsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROperationalCredentialsEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OperationalCredentialsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39535,8 +44158,8 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -39544,10 +44167,10 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -39555,12 +44178,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRSwitchAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(SwitchAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OperationalCredentialsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -39578,109 +44201,321 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + +@implementation MTRBaseClusterOperationalCredentials (Deprecated) + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self attestationRequestWithParams:params + completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler( + static_cast(data), error); + }]; +} +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self + certificateChainRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler( + static_cast(data), error); + }]; +} +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self CSRRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self addNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self updateNOCWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self updateFabricLabelWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params + completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler +{ + [self removeFabricWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self addTrustedRootCertificateWithParams:params completion:completionHandler]; +} + +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNOCsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeNOCsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNOCsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFabricsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeFabricsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeFabricsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + [self readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void) + subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSupportedFabricsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeSupportedFabricsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterSwitch (Deprecated) - -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -39689,42 +44524,43 @@ - (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNumberOfPositionsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCommissionedFabricsWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNumberOfPositionsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCommissionedFabricsWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -39733,42 +44569,43 @@ - (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentPositionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeTrustedRootCertificatesWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentPositionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeTrustedRootCertificatesWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeMultiPressMaxWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -39777,26 +44614,26 @@ - (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMultiPressMaxWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentFabricIndexWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMultiPressMaxWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -40025,7 +44862,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterAdministratorCommissioning +@implementation MTRBaseClusterGroupKeyManagement - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -40040,8 +44877,7 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params - completion:(MTRStatusCompletion)completion +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -40056,7 +44892,7 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - AdministratorCommissioning::Commands::OpenCommissioningWindow::Type request; + GroupKeyManagement::Commands::KeySetWrite::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); @@ -40069,14 +44905,46 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); + request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; + request.groupKeySet.groupKeySecurityPolicy + = static_cast>( + params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); + if (params.groupKeySet.epochKey0 == nil) { + request.groupKeySet.epochKey0.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochKey0.SetNonNull(); + nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey0]; + } + if (params.groupKeySet.epochStartTime0 == nil) { + request.groupKeySet.epochStartTime0.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochStartTime0.SetNonNull(); + nonNullValue_1 = params.groupKeySet.epochStartTime0.unsignedLongLongValue; + } + if (params.groupKeySet.epochKey1 == nil) { + request.groupKeySet.epochKey1.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochKey1.SetNonNull(); + nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey1]; + } + if (params.groupKeySet.epochStartTime1 == nil) { + request.groupKeySet.epochStartTime1.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochStartTime1.SetNonNull(); + nonNullValue_1 = params.groupKeySet.epochStartTime1.unsignedLongLongValue; + } + if (params.groupKeySet.epochKey2 == nil) { + request.groupKeySet.epochKey2.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochKey2.SetNonNull(); + nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey2]; + } + if (params.groupKeySet.epochStartTime2 == nil) { + request.groupKeySet.epochStartTime2.SetNull(); + } else { + auto & nonNullValue_1 = request.groupKeySet.epochStartTime2.SetNonNull(); + nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; - request.PAKEPasscodeVerifier = [self asByteSpan:params.pakePasscodeVerifier]; - request.discriminator = params.discriminator.unsignedShortValue; - request.iterations = params.iterations.unsignedIntValue; - request.salt = [self asByteSpan:params.salt]; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -40084,8 +44952,42 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO std::move(*bridge).DispatchAction(self.device); } -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completion:(MTRStatusCompletion)completion +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + GroupKeyManagementClusterKeySetReadResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + GroupKeyManagement::Commands::KeySetRead::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.groupKeySetID = params.groupKeySetID.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -40100,7 +45002,42 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu Optional timedInvokeTimeoutMs; Optional invokeTimeout; ListFreer listFreer; - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type request; + GroupKeyManagement::Commands::KeySetRemove::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.groupKeySetID = params.groupKeySetID.unsignedShortValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, completion, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, + GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType successCb, MTRErrorCallback failureCb, + MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; if (params != nil) { if (params.timedInvokeTimeoutMs != nil) { params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); @@ -40113,90 +45050,169 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - request.commissioningTimeout = params.commissioningTimeout.unsignedShortValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (params.groupKeySetIDs.count != 0) { + auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < params.groupKeySetIDs.count; ++i_0) { + if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; + listHolder_0->mList[i_0] = element_0.unsignedShortValue; + } + request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); + } else { + request.groupKeySetIDs = ListType_0(); + } + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil) { + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.count); + if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_0); + for (size_t i_0 = 0; i_0 < value.count; ++i_0) { + if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupKeyMapStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; + listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion +- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self revokeCommissioningWithParams:nil completion:completion]; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params - completion:(MTRStatusCompletion)completion + ++ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - AdministratorCommissioning::Commands::RevokeCommissioning::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + auto * bridge = new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(GroupKeyManagementGroupKeyMapListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); } + return err; } - if (!timedInvokeTimeoutMs.HasValue()) { - timedInvokeTimeoutMs.SetValue(10000); - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); + return CHIP_ERROR_NOT_FOUND; }); - std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - return MTRReadAttribute( +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, - self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AdministratorCommissioningClusterCommissioningWindowStatusEnumAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(GroupKeyManagementGroupTableListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40211,36 +45227,37 @@ + (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheCont }); } -- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - return MTRReadAttribute( + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40255,35 +45272,37 @@ + (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCache }); } -- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - return MTRReadAttribute( + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRNullableInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(NullableInt16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40301,9 +45320,8 @@ + (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40312,8 +45330,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40324,12 +45342,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AdministratorCommissioningGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(GroupKeyManagementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40347,9 +45365,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40358,8 +45375,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40370,12 +45387,55 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AdministratorCommissioningAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(GroupKeyManagementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRGroupKeyManagementEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(GroupKeyManagementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40393,9 +45453,8 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40403,8 +45462,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40414,12 +45473,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(AdministratorCommissioningAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(GroupKeyManagementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40437,7 +45496,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40446,7 +45505,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -40462,7 +45521,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40480,7 +45539,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -40489,7 +45548,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -40506,7 +45565,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -40523,41 +45582,65 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) +@implementation MTRBaseClusterGroupKeyManagement (Deprecated) -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self openCommissioningWindowWithParams:params completion:completionHandler]; + [self keySetWriteWithParams:params completion:completionHandler]; } -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self openBasicCommissioningWindowWithParams:params completion:completionHandler]; + [self keySetReadWithParams:params + completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self revokeCommissioningWithParams:params completion:completionHandler]; + [self keySetRemoveWithParams:params completion:completionHandler]; } -- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params + completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error))completionHandler { - [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; + [self keySetReadAllIndicesWithParams:params + completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler( + static_cast(data), error); + }]; } -- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeGroupKeyMapWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeGroupKeyMapWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -40566,42 +45649,85 @@ - (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWindowStatusWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeGroupKeyMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWindowStatusWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGroupKeyMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGroupTableWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGroupTableWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void) - subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -40610,42 +45736,43 @@ - (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAdminFabricIndexWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxGroupsPerFabricWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxGroupsPerFabricWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -40654,26 +45781,26 @@ - (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAdminVendorIdWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeMaxGroupKeysPerFabricWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminVendorIdWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeMaxGroupKeysPerFabricWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -40880,597 +46007,72 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterOperationalCredentials - -- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue -{ - if (self = [super initWithQueue:queue]) { - if (device == nil) { - return nil; - } - - _device = device; - _endpoint = [endpointID unsignedShortValue]; - } - return self; -} - -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params - completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsClusterAttestationResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterAttestationResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AttestationRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.attestationNonce = [self asByteSpan:params.attestationNonce]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params - completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsClusterCertificateChainResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCertificateChainResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CertificateChainRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.certificateType - = static_cast>(params.certificateType.unsignedCharValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params - completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsClusterCSRResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterCSRResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::CSRRequest::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.CSRNonce = [self asByteSpan:params.csrNonce]; - if (params.isForUpdateNOC != nil) { - auto & definedValue_0 = request.isForUpdateNOC.Emplace(); - definedValue_0 = params.isForUpdateNOC.boolValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddNOC::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - request.IPKValue = [self asByteSpan:params.ipkValue]; - request.caseAdminSubject = params.caseAdminSubject.unsignedLongLongValue; - request.adminVendorId - = static_cast>(params.adminVendorId.unsignedShortValue); - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateNOC::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.NOCValue = [self asByteSpan:params.nocValue]; - if (params.icacValue != nil) { - auto & definedValue_0 = request.ICACValue.Emplace(); - definedValue_0 = [self asByteSpan:params.icacValue]; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::UpdateFabricLabel::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.label = [self asCharSpan:params.label]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params - completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTROperationalCredentialsClusterNOCResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - OperationalCredentialsClusterNOCResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::RemoveFabric::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.fabricIndex = params.fabricIndex.unsignedCharValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - OperationalCredentials::Commands::AddTrustedRootCertificate::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.rootCACertificate = [self asByteSpan:params.rootCACertificate]; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ // Make a copy of params before we go async. - params = [params copy]; - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROperationalCredentialsNOCsListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalCredentialsNOCsListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ // Make a copy of params before we go async. - params = [params copy]; - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTROperationalCredentialsFabricsListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalCredentialsFabricsListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} +@end -+ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion +@implementation MTRBaseClusterFixedLabel + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - auto * bridge = new MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalCredentialsTrustedRootCertificatesListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; } -- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt8uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int8uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(FixedLabelLabelListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41488,9 +46090,8 @@ + (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41499,8 +46100,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41511,12 +46112,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalCredentialsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FixedLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41534,9 +46135,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41545,8 +46145,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -41557,12 +46157,12 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalCredentialsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(FixedLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41577,35 +46177,35 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTROperationalCredentialsAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(OperationalCredentialsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRFixedLabelEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(FixedLabelEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41620,35 +46220,35 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon }); } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FixedLabelAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41663,36 +46263,35 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai }); } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - return MTRReadAttribute( + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -41707,327 +46306,67 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC }); } -@end - -@implementation MTRBaseClusterOperationalCredentials (Deprecated) - -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self attestationRequestWithParams:params - completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler( - static_cast(data), error); - }]; -} -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self - certificateChainRequestWithParams:params - completion:^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler( - static_cast(data), error); - }]; -} -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self CSRRequestWithParams:params - completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self addNOCWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self updateNOCWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self updateFabricLabelWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params - completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self addTrustedRootCertificateWithParams:params completion:completionHandler]; -} - -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNOCsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNOCsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeNOCsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNOCsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFabricsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFabricsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void) - subscribeAttributeSupportedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSupportedFabricsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedFabricsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCommissionedFabricsWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCommissionedFabricsWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTrustedRootCertificatesWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTrustedRootCertificatesWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterFixedLabel (Deprecated) + +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -42036,26 +46375,25 @@ - (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentFabricIndexWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLabelListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentFabricIndexWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -42284,7 +46622,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterGroupKeyManagement +@implementation MTRBaseClusterUserLabel - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -42299,224 +46637,21 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetWrite::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySet.groupKeySetID = params.groupKeySet.groupKeySetID.unsignedShortValue; - request.groupKeySet.groupKeySecurityPolicy - = static_cast>( - params.groupKeySet.groupKeySecurityPolicy.unsignedCharValue); - if (params.groupKeySet.epochKey0 == nil) { - request.groupKeySet.epochKey0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey0.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey0]; - } - if (params.groupKeySet.epochStartTime0 == nil) { - request.groupKeySet.epochStartTime0.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime0.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime0.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey1 == nil) { - request.groupKeySet.epochKey1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey1.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey1]; - } - if (params.groupKeySet.epochStartTime1 == nil) { - request.groupKeySet.epochStartTime1.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime1.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime1.unsignedLongLongValue; - } - if (params.groupKeySet.epochKey2 == nil) { - request.groupKeySet.epochKey2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochKey2.SetNonNull(); - nonNullValue_1 = [self asByteSpan:params.groupKeySet.epochKey2]; - } - if (params.groupKeySet.epochStartTime2 == nil) { - request.groupKeySet.epochStartTime2.SetNull(); - } else { - auto & nonNullValue_1 = request.groupKeySet.epochStartTime2.SetNonNull(); - nonNullValue_1 = params.groupKeySet.epochStartTime2.unsignedLongLongValue; - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRead::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRCommandSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable value, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetRemove::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - request.groupKeySetID = params.groupKeySetID.unsignedShortValue; - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - auto * bridge = new MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackBridge(self.callbackQueue, completion, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, - GroupKeyManagementClusterKeySetReadAllIndicesResponseCallbackType successCb, MTRErrorCallback failureCb, - MTRCallbackBridgeBase * bridge) { - auto * typedBridge = static_cast(bridge); - Optional timedInvokeTimeoutMs; - Optional invokeTimeout; - ListFreer listFreer; - GroupKeyManagement::Commands::KeySetReadAllIndices::Type request; - if (params != nil) { - if (params.timedInvokeTimeoutMs != nil) { - params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); - timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); - } - if (params.serverSideProcessingTimeout != nil) { - // Clamp to a number of seconds that will not overflow 32-bit - // int when converted to ms. - auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); - invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); - } - } - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (params.groupKeySetIDs.count != 0) { - auto * listHolder_0 = new ListHolder(params.groupKeySetIDs.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < params.groupKeySetIDs.count; ++i_0) { - if (![params.groupKeySetIDs[i_0] isKindOfClass:[NSNumber class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (NSNumber *) params.groupKeySetIDs[i_0]; - listHolder_0->mList[i_0] = element_0.unsignedShortValue; - } - request.groupKeySetIDs = ListType_0(listHolder_0->mList, params.groupKeySetIDs.count); - } else { - request.groupKeySetIDs = ListType_0(); - } - } - - return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, - timedInvokeTimeoutMs, invokeTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ // Make a copy of params before we go async. - params = [params copy]; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - return MTRReadAttribute( + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -42537,7 +46672,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value } ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; TypeInfo::Type cppValue; { using ListType_0 = std::remove_reference_t; @@ -42549,14 +46684,13 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRGroupKeyManagementClusterGroupKeyMapStruct class]]) { + if (![value[i_0] isKindOfClass:[MTRUserLabelClusterLabelStruct class]]) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *) value[i_0]; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + auto element_0 = (MTRUserLabelClusterLabelStruct *) value[i_0]; + listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; + listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; } cppValue = ListType_0(listHolder_0->mList, value.count); } else { @@ -42564,167 +46698,33 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value } } - chip::Controller::GroupKeyManagementCluster cppCluster(exchangeManager, session, self->_endpoint); + chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GroupKeyManagementGroupKeyMapListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ // Make a copy of params before we go async. - params = [params copy]; - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRGroupKeyManagementGroupTableListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GroupKeyManagementGroupTableListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); - if (err == CHIP_NO_ERROR) { - successCb(bridge, value); - } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); -} - -- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(UserLabelLabelListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42742,8 +46742,8 @@ + (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterState - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42752,8 +46752,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42764,12 +46764,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GroupKeyManagementGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(UserLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42787,8 +46787,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42797,10 +46797,10 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -42809,12 +46809,55 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GroupKeyManagementAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(UserLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRUserLabelEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(UserLabelEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42832,8 +46875,8 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42841,10 +46884,10 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, - TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer @@ -42852,12 +46895,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRUserLabelAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(GroupKeyManagementAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(UserLabelAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42875,7 +46918,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42884,7 +46927,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -42900,7 +46943,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42918,7 +46961,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -42927,7 +46970,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -42944,7 +46987,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -42961,197 +47004,31 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterGroupKeyManagement (Deprecated) - -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetWriteWithParams:params completion:completionHandler]; -} -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self keySetReadWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetRemoveWithParams:params completion:completionHandler]; -} -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams *)params - completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error))completionHandler -{ - [self keySetReadAllIndicesWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler( - static_cast(data), error); - }]; -} - -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGroupKeyMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupKeyMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGroupTableWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGroupTableWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupTableWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} +@implementation MTRBaseClusterUserLabel (Deprecated) -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeLabelListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeMaxGroupsPerFabricWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeMaxGroupsPerFabricWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeLabelListWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value + params:(MTRWriteParams * _Nullable)params + completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeLabelListWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -43160,26 +47037,25 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxGroupKeysPerFabricWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeLabelListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxGroupKeysPerFabricWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, @@ -43408,7 +47284,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterFixedLabel +@implementation MTRBaseClusterProxyConfiguration - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -43423,35 +47299,255 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ProxyConfiguration::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ProxyConfiguration::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ProxyConfigurationGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ProxyConfiguration::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ProxyConfiguration::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ProxyConfiguration::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ProxyConfigurationAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ProxyConfiguration::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ProxyConfiguration::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ProxyConfiguration::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRProxyConfigurationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ProxyConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ProxyConfiguration::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ProxyConfiguration::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ProxyConfiguration::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRProxyConfigurationAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ProxyConfigurationAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ProxyConfiguration::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ProxyConfiguration::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ProxyConfiguration::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ProxyConfiguration::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyConfiguration::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; - MTRSubscribeAttribute(params, + using TypeInfo = ProxyConfiguration::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelLabelListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(FixedLabelLabelListListAttributeCallback successCb, MTRErrorCallback failureCb) { + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = ProxyConfiguration::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -43466,11 +47562,28 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain }); } +@end + +@implementation MTRBaseClusterProxyDiscovery + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyDiscovery::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43479,8 +47592,8 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43491,12 +47604,12 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FixedLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ProxyDiscoveryGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -43514,8 +47627,8 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyDiscovery::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43524,8 +47637,8 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N reportHandler: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43536,12 +47649,55 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion: (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FixedLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ProxyDiscoveryAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ProxyDiscovery::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ProxyDiscovery::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRProxyDiscoveryEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ProxyDiscoveryEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ProxyDiscovery::Attributes::EventList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -43559,8 +47715,8 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyDiscovery::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43568,8 +47724,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( + using TypeInfo = ProxyDiscovery::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43579,12 +47735,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRProxyDiscoveryAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(FixedLabelAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ProxyDiscoveryAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -43602,7 +47758,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43611,7 +47767,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -43627,7 +47783,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -43645,7 +47801,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -43654,7 +47810,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -43671,7 +47827,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ProxyDiscovery::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -43688,277 +47844,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterFixedLabel (Deprecated) - -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLabelListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - -@implementation MTRBaseClusterUserLabel +@implementation MTRBaseClusterProxyValid - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { @@ -43973,94 +47859,37 @@ - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)en return self; } -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyValid::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge( - self.callbackQueue, - ^(id _Nullable ignored, NSError * _Nullable error) { - completion(error); - }, - ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, - MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil) { - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.count); - if (listHolder_0 == nullptr || listHolder_0->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_0); - for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if (![value[i_0] isKindOfClass:[MTRUserLabelClusterLabelStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUserLabelClusterLabelStruct *) value[i_0]; - listHolder_0->mList[i_0].label = [self asCharSpan:element_0.label]; - listHolder_0->mList[i_0].value = [self asCharSpan:element_0.value]; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } - - chip::Controller::UserLabelCluster cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); + using TypeInfo = ProxyValid::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelLabelListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction( - clusterStateCacheContainer.baseDevice, ^(UserLabelLabelListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRProxyValidGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ProxyValidGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = ProxyValid::Attributes::GeneratedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44075,37 +47904,37 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain }); } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyValid::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; - MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRProxyValidAcceptedCommandListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(UserLabelGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ProxyValidAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ProxyValid::Attributes::AcceptedCommandList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44120,37 +47949,35 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC }); } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyValid::Attributes::EventList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + using TypeInfo = ProxyValid::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(UserLabelAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + auto * bridge = new MTRProxyValidEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(ProxyValidEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ProxyValid::Attributes::EventList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44168,8 +47995,8 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - return MTRReadAttribute( + using TypeInfo = ProxyValid::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44177,8 +48004,8 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; - MTRSubscribeAttribute( + using TypeInfo = ProxyValid::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44188,12 +48015,12 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - auto * bridge = new MTRUserLabelAttributeListListAttributeCallbackBridge(queue, completion); + auto * bridge = new MTRProxyValidAttributeListListAttributeCallbackBridge(queue, completion); std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(UserLabelAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + ^(ProxyValidAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = ProxyValid::Attributes::AttributeList::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44211,7 +48038,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ProxyValid::Attributes::FeatureMap::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44220,7 +48047,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ProxyValid::Attributes::FeatureMap::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -44236,7 +48063,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ProxyValid::Attributes::FeatureMap::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44254,7 +48081,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ProxyValid::Attributes::ClusterRevision::TypeInfo; return MTRReadAttribute( params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } @@ -44263,7 +48090,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ProxyValid::Attributes::ClusterRevision::TypeInfo; MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); @@ -44280,7 +48107,7 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { if (clusterStateCacheContainer.cppClusterStateCache) { chip::app::ConcreteAttributePath path; - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ProxyValid::Attributes::ClusterRevision::TypeInfo; path.mEndpointId = static_cast([endpoint unsignedShortValue]); path.mClusterId = TypeInfo::GetClusterId(); path.mAttributeId = TypeInfo::GetAttributeId(); @@ -44297,286 +48124,6 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterUserLabel (Deprecated) - -- (void)readAttributeLabelListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLabelListWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value - params:(MTRWriteParams * _Nullable)params - completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLabelListWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLabelListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLabelListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue -{ - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; -} - -@end - @implementation MTRBaseClusterBooleanState - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue @@ -44725,6 +48272,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRBooleanStateEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(BooleanStateEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -45611,6 +49201,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRModeSelectEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(ModeSelectEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -49408,6 +53041,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRDoorLockEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(DoorLockEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = DoorLock::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -53098,6 +56774,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRWindowCoveringEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(WindowCoveringEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WindowCovering::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -55350,6 +59069,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRBarrierControlEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BarrierControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BarrierControl::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -57510,6 +61272,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PumpConfigurationAndControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PumpConfigurationAndControl::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -62424,6 +66229,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRThermostatEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(ThermostatEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Thermostat::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -66095,6 +69943,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FanControl::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FanControl::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRFanControlEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(FanControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FanControl::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -67342,6 +71233,50 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ThermostatUserInterfaceConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ThermostatUserInterfaceConfiguration::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -71524,6 +75459,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRColorControlEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(ColorControlEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ColorControl::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -75494,6 +79472,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRBallastConfigurationEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(BallastConfigurationEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = BallastConfiguration::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -76894,6 +80915,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(IlluminanceMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = IlluminanceMeasurement::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -77753,6 +81817,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRTemperatureMeasurementEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TemperatureMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TemperatureMeasurement::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -78783,6 +82890,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRPressureMeasurementEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(PressureMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = PressureMeasurement::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -79812,6 +83962,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRFlowMeasurementEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FlowMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FlowMeasurement::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -80627,6 +84820,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(RelativeHumidityMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = RelativeHumidityMeasurement::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -82180,6 +86416,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTROccupancySensingEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(OccupancySensingEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = OccupancySensing::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -83353,6 +87632,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRWakeOnLANEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(WakeOnLANEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = WakeOnLan::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -84108,6 +88430,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = Channel::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Channel::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRChannelEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(ChannelEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = Channel::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -84852,6 +89217,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRTargetNavigatorEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(TargetNavigatorEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TargetNavigator::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -86137,6 +90545,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRMediaPlaybackEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(MediaPlaybackEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaPlayback::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -87298,6 +91749,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRMediaInputEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(MediaInputEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = MediaInput::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -87916,6 +92410,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRLowPowerEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(LowPowerEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = LowPower::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -88424,6 +92961,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRKeypadInputEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(KeypadInputEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = KeypadInput::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -89251,6 +93831,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRContentLauncherEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ContentLauncherEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ContentLauncher::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -89995,6 +94618,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAudioOutputEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(AudioOutputEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AudioOutput::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -90825,6 +95491,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRApplicationLauncherEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ApplicationLauncherEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationLauncher::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -91775,6 +96484,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRApplicationBasicEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ApplicationBasicEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ApplicationBasic::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -92712,6 +97464,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRAccountLoginEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(AccountLoginEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = AccountLogin::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -99333,6 +104128,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRElectricalMeasurementEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ElectricalMeasurementEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ElectricalMeasurement::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -104912,32 +109750,491 @@ + (void)readAttributeApparentPowerPhaseCWithAttributeCache:(MTRAttributeCacheCon endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeApparentPowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePowerFactorPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerFactorPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) + subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: + (MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, + NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler( + static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any + // selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, + NSError * _Nullable error))completionHandler +{ + [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished: + (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeApparentPowerPhaseCWithClusterStateCache:attributeCacheContainer.realContainer + [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributePowerFactorPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( + NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -104946,44 +110243,41 @@ - (void)subscribeAttributePowerFactorPhaseCWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePowerFactorPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAttributeListWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributePowerFactorPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePowerFactorPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable) - subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -104992,48 +110286,41 @@ - (void)subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithMinInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeFeatureMapWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithAttributeCache: - (MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, - NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler( - static_cast(value), error); - }]; + [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, + NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler +- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval + maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -105042,480 +110329,605 @@ - (void)subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithMinInterval:(NSN subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeClusterRevisionWithParams:subscribeParams + subscriptionEstablished:subscriptionEstablishedHandler + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAverageRmsOverVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completionHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAverageRmsOverVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer + endpoint:endpoint + queue:queue + completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue { - [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterClientMonitoring + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; } - [self subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + return self; } -+ (void)readAttributeAverageRmsUnderVoltageCounterPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)registerClientMonitoringWithParams:(MTRClientMonitoringClusterRegisterClientMonitoringParams *)params + completion:(MTRStatusCompletion)completion { - [self readAttributeAverageRmsUnderVoltageCounterPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any - // selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ClientMonitoring::Commands::RegisterClientMonitoring::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.clientNodeId = params.clientNodeId.unsignedLongLongValue; + request.ICid = params.iCid.unsignedLongLongValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)unregisterClientMonitoringWithParams:(MTRClientMonitoringClusterUnregisterClientMonitoringParams *)params + completion:(MTRStatusCompletion)completion { - [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ClientMonitoring::Commands::UnregisterClientMonitoring::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.clientNodeId = params.clientNodeId.unsignedLongLongValue; + request.ICid = params.iCid.unsignedLongLongValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + +- (void)stayAwakeRequestWithCompletion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self stayAwakeRequestWithParams:nil completion:completion]; } -+ (void)readAttributeRmsExtremeOverVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)stayAwakeRequestWithParams:(MTRClientMonitoringClusterStayAwakeRequestParams * _Nullable)params + completion:(MTRStatusCompletion)completion { - [self readAttributeRmsExtremeOverVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ClientMonitoring::Commands::StayAwakeRequest::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler +- (void)readAttributeIdleModeIntervalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::IdleModeInterval::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeIdleModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::IdleModeInterval::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -+ (void)readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + ++ (void)readAttributeIdleModeIntervalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::IdleModeInterval::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveModeIntervalWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::ActiveModeInterval::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeActiveModeIntervalWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ClientMonitoring::Attributes::ActiveModeInterval::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeActiveModeIntervalWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::ActiveModeInterval::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::ActiveModeThreshold::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ClientMonitoring::Attributes::ActiveModeThreshold::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::ActiveModeThreshold::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)readAttributeRmsVoltageSagPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler -{ - [self readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeRmsVoltageSagPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler -{ - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; +- (void)readAttributeExpectedClientsWithParams:(MTRReadParams * _Nullable)params + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ // Make a copy of params before we go async. + params = [params copy]; + using TypeInfo = ClientMonitoring::Attributes::ExpectedClients::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeRmsVoltageSagPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeExpectedClientsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageSagPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::ExpectedClients::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeRmsVoltageSwellPeriodPhaseCWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeExpectedClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRClientMonitoringExpectedClientsListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ClientMonitoringExpectedClientsListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::ExpectedClients::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeRmsVoltageSwellPeriodPhaseCWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeRmsVoltageSwellPeriodPhaseCWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRmsVoltageSwellPeriodPhaseCWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ClientMonitoringGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeGeneratedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeGeneratedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ClientMonitoringAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished: - (MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAcceptedCommandListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)( - NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRClientMonitoringEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ClientMonitoringEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeAttributeListWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAttributeListWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( - NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRClientMonitoringAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(ClientMonitoringAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeFeatureMapWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } -- (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)minInterval - maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeClusterRevisionWithParams:subscribeParams - subscriptionEstablished:subscriptionEstablishedHandler - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = ClientMonitoring::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completionHandler: - (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithClusterStateCache:attributeCacheContainer.realContainer - endpoint:endpoint - queue:queue - completion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ClientMonitoring::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16_t)endpoint queue:(dispatch_queue_t)queue ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = ClientMonitoring::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); } @end @@ -114311,6 +119723,49 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa }); } +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRUnitTestingEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(UnitTestingEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = UnitTesting::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { MTRReadParams * params = [[MTRReadParams alloc] init]; @@ -119316,4 +124771,363 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end +@implementation MTRBaseClusterFaultInjection + +- (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _device = device; + _endpoint = [endpointID unsignedShortValue]; + } + return self; +} + +- (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + FaultInjection::Commands::FailAtFault::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.numCallsToSkip = params.numCallsToSkip.unsignedIntValue; + request.numCallsToFail = params.numCallsToFail.unsignedIntValue; + request.takeMutex = params.takeMutex.boolValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable value, NSError * _Nullable error) { + completion(error); + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + FaultInjection::Commands::FailRandomlyAtFault::Type request; + if (params != nil) { + if (params.timedInvokeTimeoutMs != nil) { + params.timedInvokeTimeoutMs = MTRClampedNumber(params.timedInvokeTimeoutMs, @(1), @(UINT16_MAX)); + timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); + } + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.percentage = params.percentage.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, + timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FaultInjection::Attributes::GeneratedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FaultInjection::Attributes::GeneratedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FaultInjectionGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::GeneratedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FaultInjection::Attributes::AcceptedCommandList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FaultInjection::Attributes::AcceptedCommandList::TypeInfo; + MTRSubscribeAttribute(params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, + TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FaultInjectionAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::AcceptedCommandList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FaultInjection::Attributes::EventList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FaultInjection::Attributes::EventList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRFaultInjectionEventListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FaultInjectionEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::EventList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FaultInjection::Attributes::AttributeList::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FaultInjection::Attributes::AttributeList::TypeInfo; + MTRSubscribeAttribute( + params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRFaultInjectionAttributeListListAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, + ^(FaultInjectionAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::AttributeList::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FaultInjection::Attributes::FeatureMap::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FaultInjection::Attributes::FeatureMap::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt32uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int32uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::FeatureMap::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + MTRReadParams * params = [[MTRReadParams alloc] init]; + using TypeInfo = FaultInjection::Attributes::ClusterRevision::TypeInfo; + return MTRReadAttribute( + params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); +} + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = FaultInjection::Attributes::ClusterRevision::TypeInfo; + MTRSubscribeAttribute(params, + subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), + TypeInfo::GetAttributeId()); +} + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer + endpoint:(NSNumber *)endpoint + queue:(dispatch_queue_t)queue + completion: + (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + auto * bridge = new MTRInt16uAttributeCallbackBridge(queue, completion); + std::move(*bridge).DispatchLocalAction( + clusterStateCacheContainer.baseDevice, ^(Int16uAttributeCallback successCb, MTRErrorCallback failureCb) { + if (clusterStateCacheContainer.cppClusterStateCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = FaultInjection::Attributes::ClusterRevision::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = clusterStateCacheContainer.cppClusterStateCache->Get(path, value); + if (err == CHIP_NO_ERROR) { + successCb(bridge, value); + } + return err; + } + return CHIP_ERROR_NOT_FOUND; + }); +} + +@end + // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index da38cd3855be2b..f4f128c6c0b8b5 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -57,6 +57,11 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end +@interface MTRBaseClusterPulseWidthModulation () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end + @interface MTRBaseClusterDescriptor () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @@ -157,6 +162,11 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end +@interface MTRBaseClusterTimeSynchronization () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end + @interface MTRBaseClusterBridgedDeviceBasicInformation () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @@ -192,6 +202,21 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end +@interface MTRBaseClusterProxyConfiguration () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end + +@interface MTRBaseClusterProxyDiscovery () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end + +@interface MTRBaseClusterProxyValid () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end + @interface MTRBaseClusterBooleanState () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @@ -342,7 +367,17 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end +@interface MTRBaseClusterClientMonitoring () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end + @interface MTRBaseClusterUnitTesting () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end + +@interface MTRBaseClusterFaultInjection () +@property (nonatomic, strong, readonly) MTRBaseDevice * device; +@property (nonatomic, assign, readonly) chip::EndpointId endpoint; +@end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index ac61e7fc8f2ddb..2e6eb5c4dc639a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -568,30 +568,40 @@ typedef void (*IdentifyGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IdentifyAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*IdentifyEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*IdentifyAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GroupsEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*GroupsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ScenesGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ScenesAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ScenesEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ScenesAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*OnOffAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffSwitchConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffSwitchConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OnOffSwitchConfigurationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OnOffSwitchConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LevelControlOptionsAttributeCallback)(void *, chip::BitMask); @@ -599,14 +609,26 @@ typedef void (*LevelControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LevelControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LevelControlEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*LevelControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BinaryInputBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BinaryInputBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BinaryInputBasicEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*BinaryInputBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PulseWidthModulationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PulseWidthModulationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PulseWidthModulationEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*PulseWidthModulationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DescriptorDeviceTypeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); @@ -620,6 +642,8 @@ typedef void (*DescriptorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DescriptorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DescriptorEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*DescriptorAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BindingBindingListAttributeCallback)( @@ -629,6 +653,8 @@ typedef void (*BindingGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BindingAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BindingEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*BindingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlACLListAttributeCallback)( @@ -643,6 +669,8 @@ typedef void (*AccessControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccessControlEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*AccessControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ActionsActionListListAttributeCallback)( @@ -655,6 +683,8 @@ typedef void (*ActionsGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ActionsAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ActionsEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ActionsAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationCapabilityMinimaStructAttributeCallback)( @@ -665,12 +695,16 @@ typedef void (*BasicInformationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BasicInformationEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*BasicInformationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateProviderGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateProviderAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OTASoftwareUpdateProviderEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateProviderAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallback)( @@ -681,6 +715,8 @@ typedef void (*OTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallba void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OTASoftwareUpdateRequestorEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OTASoftwareUpdateRequestorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LocalizationConfigurationSupportedLocalesListAttributeCallback)( @@ -689,6 +725,8 @@ typedef void (*LocalizationConfigurationGeneratedCommandListListAttributeCallbac void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LocalizationConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LocalizationConfigurationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LocalizationConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TimeFormatLocalizationSupportedCalendarTypesListAttributeCallback)( @@ -698,12 +736,16 @@ typedef void (*TimeFormatLocalizationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TimeFormatLocalizationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeFormatLocalizationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TimeFormatLocalizationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitLocalizationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitLocalizationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UnitLocalizationEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*UnitLocalizationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceConfigurationSourcesListAttributeCallback)(void * context, @@ -712,6 +754,8 @@ typedef void (*PowerSourceConfigurationGeneratedCommandListListAttributeCallback void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceConfigurationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceActiveWiredFaultsListAttributeCallback)( @@ -724,6 +768,8 @@ typedef void (*PowerSourceGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PowerSourceEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*PowerSourceAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningBasicCommissioningInfoStructAttributeCallback)( @@ -732,6 +778,8 @@ typedef void (*GeneralCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralCommissioningEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*NetworkCommissioningNetworksListAttributeCallback)( @@ -742,12 +790,16 @@ typedef void (*NetworkCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*NetworkCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*NetworkCommissioningEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*NetworkCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DiagnosticLogsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DiagnosticLogsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DiagnosticLogsEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*DiagnosticLogsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralDiagnosticsNetworkInterfacesListAttributeCallback)( @@ -764,6 +816,8 @@ typedef void (*GeneralDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GeneralDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GeneralDiagnosticsEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*GeneralDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SoftwareDiagnosticsThreadMetricsListAttributeCallback)( @@ -774,6 +828,8 @@ typedef void (*SoftwareDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SoftwareDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*SoftwareDiagnosticsEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*SoftwareDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThreadNetworkDiagnosticsNeighborTableListAttributeCallback)( @@ -797,38 +853,66 @@ typedef void (*ThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallback void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThreadNetworkDiagnosticsEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThreadNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WiFiNetworkDiagnosticsEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WiFiNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*EthernetNetworkDiagnosticsEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*EthernetNetworkDiagnosticsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationTimeZoneListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*TimeSynchronizationDSTOffsetListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & + data); +typedef void (*TimeSynchronizationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*TimeSynchronizationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationProductAppearanceStructAttributeCallback)( void *, const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType &); typedef void (*BridgedDeviceBasicInformationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BridgedDeviceBasicInformationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BridgedDeviceBasicInformationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SwitchGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*SwitchAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*SwitchEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*SwitchAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AdministratorCommissioningGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AdministratorCommissioningAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AdministratorCommissioningEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AdministratorCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsNOCsListAttributeCallback)( @@ -845,6 +929,8 @@ typedef void (*OperationalCredentialsGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OperationalCredentialsEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OperationalCredentialsAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupKeyManagementGroupKeyMapListAttributeCallback)( @@ -859,6 +945,8 @@ typedef void (*GroupKeyManagementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*GroupKeyManagementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*GroupKeyManagementEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*GroupKeyManagementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FixedLabelLabelListListAttributeCallback)( @@ -868,6 +956,8 @@ typedef void (*FixedLabelGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FixedLabelAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FixedLabelEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*FixedLabelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UserLabelLabelListListAttributeCallback)( @@ -877,12 +967,40 @@ typedef void (*UserLabelGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UserLabelAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UserLabelEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*UserLabelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyConfigurationGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyConfigurationAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyConfigurationEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyConfigurationAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyDiscoveryGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyDiscoveryAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyDiscoveryEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyDiscoveryAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyValidGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyValidAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyValidEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ProxyValidAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*BooleanStateGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BooleanStateAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BooleanStateEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*BooleanStateAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectSupportedModesListAttributeCallback)( @@ -892,6 +1010,8 @@ typedef void (*ModeSelectGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ModeSelectEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockCredentialRulesSupportAttributeCallback)(void *, @@ -906,6 +1026,8 @@ typedef void (*DoorLockGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*DoorLockEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*DoorLockAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringConfigStatusAttributeCallback)(void *, @@ -919,12 +1041,16 @@ typedef void (*WindowCoveringGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WindowCoveringEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*WindowCoveringAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BarrierControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BarrierControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BarrierControlEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*BarrierControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlPumpStatusAttributeCallback)( @@ -933,66 +1059,88 @@ typedef void (*PumpConfigurationAndControlGeneratedCommandListListAttributeCallb void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PumpConfigurationAndControlEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FanControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FanControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FanControlEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*FanControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatUserInterfaceConfigurationEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatUserInterfaceConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ColorControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ColorControlAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ColorControlEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ColorControlAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BallastConfigurationGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*BallastConfigurationAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*BallastConfigurationEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*BallastConfigurationAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IlluminanceMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IlluminanceMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*IlluminanceMeasurementEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*IlluminanceMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TemperatureMeasurementEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PressureMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PressureMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*PressureMeasurementEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*PressureMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FlowMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*FlowMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FlowMeasurementEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*FlowMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RelativeHumidityMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RelativeHumidityMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*RelativeHumidityMeasurementEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*RelativeHumidityMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OccupancySensingOccupancyAttributeCallback)(void *, @@ -1003,12 +1151,16 @@ typedef void (*OccupancySensingGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*OccupancySensingAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*OccupancySensingEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*OccupancySensingAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WakeOnLANGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*WakeOnLANAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*WakeOnLANEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*WakeOnLANAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ChannelChannelListListAttributeCallback)( @@ -1022,6 +1174,8 @@ typedef void (*ChannelGeneratedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ChannelAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ChannelEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ChannelAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TargetNavigatorTargetListListAttributeCallback)( @@ -1032,6 +1186,8 @@ typedef void (*TargetNavigatorGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TargetNavigatorAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*TargetNavigatorEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*TargetNavigatorAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackSampledPositionStructAttributeCallback)( @@ -1041,6 +1197,8 @@ typedef void (*MediaPlaybackGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MediaPlaybackEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*MediaPlaybackAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaInputInputListListAttributeCallback)( @@ -1050,18 +1208,24 @@ typedef void (*MediaInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MediaInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MediaInputEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*MediaInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LowPowerGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*LowPowerAcceptedCommandListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*LowPowerEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*LowPowerAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*KeypadInputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*KeypadInputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*KeypadInputEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, @@ -1070,6 +1234,8 @@ typedef void (*ContentLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ContentLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ContentLauncherEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ContentLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AudioOutputOutputListListAttributeCallback)( @@ -1079,6 +1245,8 @@ typedef void (*AudioOutputGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AudioOutputAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AudioOutputEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*AudioOutputAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationLauncherCatalogListListAttributeCallback)(void * context, @@ -1090,6 +1258,8 @@ typedef void (*ApplicationLauncherGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationLauncherAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationLauncherEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationLauncherAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicApplicationStructAttributeCallback)( @@ -1100,20 +1270,38 @@ typedef void (*ApplicationBasicGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ApplicationBasicEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ApplicationBasicAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccountLoginGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*AccountLoginAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*AccountLoginEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*AccountLoginAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ElectricalMeasurementEventListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ElectricalMeasurementAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringExpectedClientsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> & data); +typedef void (*ClientMonitoringGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ClientMonitoringAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingBitmap8AttributeCallback)(void *, chip::BitMask); typedef void (*UnitTestingBitmap16AttributeCallback)(void *, chip::BitMask); typedef void (*UnitTestingBitmap32AttributeCallback)(void *, chip::BitMask); @@ -1151,8 +1339,18 @@ typedef void (*UnitTestingGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingAcceptedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*UnitTestingEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*UnitTestingAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionAcceptedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionEventListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*FaultInjectionAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); class MTRDefaultSuccessCallbackBridge : public MTRCallbackBridge { @@ -2057,6 +2255,36 @@ class MTRIdentifyAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRIdentifyEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRIdentifyEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRIdentifyEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRIdentifyEventListListAttributeCallbackSubscriptionBridge : public MTRIdentifyEventListListAttributeCallbackBridge +{ +public: + MTRIdentifyEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIdentifyEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRIdentifyEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIdentifyEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRIdentifyAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -2153,6 +2381,36 @@ class MTRGroupsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRGroupsEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRGroupsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRGroupsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRGroupsEventListListAttributeCallbackSubscriptionBridge : public MTRGroupsEventListListAttributeCallbackBridge +{ +public: + MTRGroupsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGroupsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRGroupsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -2249,6 +2507,36 @@ class MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRScenesEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRScenesEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRScenesEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRScenesEventListListAttributeCallbackSubscriptionBridge : public MTRScenesEventListListAttributeCallbackBridge +{ +public: + MTRScenesEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRScenesEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRScenesEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRScenesEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRScenesAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -2344,6 +2632,35 @@ class MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTROnOffEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTROnOffEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTROnOffEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTROnOffEventListListAttributeCallbackSubscriptionBridge : public MTROnOffEventListListAttributeCallbackBridge +{ +public: + MTROnOffEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROnOffEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTROnOffEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTROnOffAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -2440,6 +2757,39 @@ class MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTROnOffSwitchConfigurationEventListListAttributeCallbackSubscriptionBridge + : public MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge +{ +public: + MTROnOffSwitchConfigurationEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -2569,6 +2919,36 @@ class MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRLevelControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRLevelControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLevelControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLevelControlEventListListAttributeCallbackSubscriptionBridge : public MTRLevelControlEventListListAttributeCallbackBridge +{ +public: + MTRLevelControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLevelControlEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLevelControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLevelControlEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRLevelControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -2668,6 +3048,39 @@ class MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBinaryInputBasicEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBinaryInputBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBinaryInputBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBinaryInputBasicEventListListAttributeCallbackSubscriptionBridge + : public MTRBinaryInputBasicEventListListAttributeCallbackBridge +{ +public: + MTRBinaryInputBasicEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBinaryInputBasicEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBinaryInputBasicEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBinaryInputBasicEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBinaryInputBasicAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -2701,6 +3114,138 @@ class MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRPulseWidthModulationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPulseWidthModulationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPulseWidthModulationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPulseWidthModulationEventListListAttributeCallbackSubscriptionBridge + : public MTRPulseWidthModulationEventListListAttributeCallbackBridge +{ +public: + MTRPulseWidthModulationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPulseWidthModulationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPulseWidthModulationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPulseWidthModulationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRPulseWidthModulationAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPulseWidthModulationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPulseWidthModulationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPulseWidthModulationAttributeListListAttributeCallbackSubscriptionBridge + : public MTRPulseWidthModulationAttributeListListAttributeCallbackBridge +{ +public: + MTRPulseWidthModulationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPulseWidthModulationAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPulseWidthModulationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPulseWidthModulationAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRDescriptorDeviceTypeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -2892,26 +3437,56 @@ class MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRDescriptorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRDescriptorEventListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRDescriptorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRDescriptorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge - : public MTRDescriptorAttributeListListAttributeCallbackBridge +class MTRDescriptorEventListListAttributeCallbackSubscriptionBridge : public MTRDescriptorEventListListAttributeCallbackBridge { public: - MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRDescriptorAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRDescriptorEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDescriptorEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRDescriptorEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDescriptorEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRDescriptorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRDescriptorAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge + : public MTRDescriptorAttributeListListAttributeCallbackBridge +{ +public: + MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDescriptorAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} @@ -3020,6 +3595,36 @@ class MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBindingEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRBindingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBindingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBindingEventListListAttributeCallbackSubscriptionBridge : public MTRBindingEventListListAttributeCallbackBridge +{ +public: + MTRBindingEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBindingEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBindingEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBindingEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBindingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -3180,6 +3785,36 @@ class MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRAccessControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRAccessControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRAccessControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRAccessControlEventListListAttributeCallbackSubscriptionBridge : public MTRAccessControlEventListListAttributeCallbackBridge +{ +public: + MTRAccessControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccessControlEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRAccessControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccessControlEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRAccessControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3344,6 +3979,36 @@ class MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRActionsEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRActionsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRActionsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRActionsEventListListAttributeCallbackSubscriptionBridge : public MTRActionsEventListListAttributeCallbackBridge +{ +public: + MTRActionsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRActionsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRActionsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRActionsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRActionsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -3508,6 +4173,39 @@ class MTRBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBasicInformationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBasicInformationEventListListAttributeCallbackSubscriptionBridge + : public MTRBasicInformationEventListListAttributeCallbackBridge +{ +public: + MTRBasicInformationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBasicInformationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBasicInformationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBasicInformationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBasicInformationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3608,6 +4306,39 @@ class MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscr MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTROTASoftwareUpdateProviderEventListListAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge +{ +public: + MTROTASoftwareUpdateProviderEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3745,6 +4476,39 @@ class MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubsc MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTROTASoftwareUpdateRequestorEventListListAttributeCallbackSubscriptionBridge + : public MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge +{ +public: + MTROTASoftwareUpdateRequestorEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -3878,6 +4642,39 @@ class MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscr MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRLocalizationConfigurationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRLocalizationConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLocalizationConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLocalizationConfigurationEventListListAttributeCallbackSubscriptionBridge + : public MTRLocalizationConfigurationEventListListAttributeCallbackBridge +{ +public: + MTRLocalizationConfigurationEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLocalizationConfigurationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLocalizationConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLocalizationConfigurationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4012,6 +4809,39 @@ class MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRTimeFormatLocalizationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRTimeFormatLocalizationEventListListAttributeCallbackSubscriptionBridge + : public MTRTimeFormatLocalizationEventListListAttributeCallbackBridge +{ +public: + MTRTimeFormatLocalizationEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTimeFormatLocalizationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRTimeFormatLocalizationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeFormatLocalizationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4111,6 +4941,39 @@ class MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRUnitLocalizationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRUnitLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRUnitLocalizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRUnitLocalizationEventListListAttributeCallbackSubscriptionBridge + : public MTRUnitLocalizationEventListListAttributeCallbackBridge +{ +public: + MTRUnitLocalizationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitLocalizationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRUnitLocalizationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitLocalizationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRUnitLocalizationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4243,6 +5106,39 @@ class MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRPowerSourceConfigurationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPowerSourceConfigurationEventListListAttributeCallbackSubscriptionBridge + : public MTRPowerSourceConfigurationEventListListAttributeCallbackBridge +{ +public: + MTRPowerSourceConfigurationEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceConfigurationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPowerSourceConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceConfigurationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4445,6 +5341,36 @@ class MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRPowerSourceEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRPowerSourceEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPowerSourceEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPowerSourceEventListListAttributeCallbackSubscriptionBridge : public MTRPowerSourceEventListListAttributeCallbackBridge +{ +public: + MTRPowerSourceEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPowerSourceEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPowerSourceEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPowerSourceEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRPowerSourceAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4578,18 +5504,51 @@ class MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGeneralCommissioningAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRGeneralCommissioningEventListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRGeneralCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGeneralCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRGeneralCommissioningEventListListAttributeCallbackSubscriptionBridge + : public MTRGeneralCommissioningEventListListAttributeCallbackBridge +{ +public: + MTRGeneralCommissioningEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralCommissioningEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGeneralCommissioningEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralCommissioningEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRGeneralCommissioningAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRGeneralCommissioningAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; class MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge @@ -4713,6 +5672,39 @@ class MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRNetworkCommissioningEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRNetworkCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRNetworkCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRNetworkCommissioningEventListListAttributeCallbackSubscriptionBridge + : public MTRNetworkCommissioningEventListListAttributeCallbackBridge +{ +public: + MTRNetworkCommissioningEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRNetworkCommissioningEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRNetworkCommissioningEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRNetworkCommissioningEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRNetworkCommissioningAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -4812,6 +5804,37 @@ class MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridg MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRDiagnosticLogsEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRDiagnosticLogsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRDiagnosticLogsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRDiagnosticLogsEventListListAttributeCallbackSubscriptionBridge + : public MTRDiagnosticLogsEventListListAttributeCallbackBridge +{ +public: + MTRDiagnosticLogsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDiagnosticLogsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRDiagnosticLogsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDiagnosticLogsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRDiagnosticLogsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5051,6 +6074,39 @@ class MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionB MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRGeneralDiagnosticsEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRGeneralDiagnosticsEventListListAttributeCallbackSubscriptionBridge + : public MTRGeneralDiagnosticsEventListListAttributeCallbackBridge +{ +public: + MTRGeneralDiagnosticsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGeneralDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGeneralDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGeneralDiagnosticsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5185,6 +6241,39 @@ class MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscription MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRSoftwareDiagnosticsEventListListAttributeCallbackSubscriptionBridge + : public MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge +{ +public: + MTRSoftwareDiagnosticsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5465,6 +6554,39 @@ class MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRThreadNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge + : public MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge +{ +public: + MTRThreadNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5564,6 +6686,39 @@ class MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge + : public MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge +{ +public: + MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5665,6 +6820,39 @@ class MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubsc MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTREthernetNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge + : public MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge +{ +public: + MTREthernetNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -5698,161 +6886,396 @@ class MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void - OnSuccessFn(void * context, - const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> & value); }; -class MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge - : public MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge +class MTRTimeSynchronizationTimeZoneListAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge { public: - MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, handler, action), + MTRTimeSynchronizationTimeZoneListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnDone; + using MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::TimeSynchronization::Structs::DSTOffsetStruct::DecodableType> & value); }; -class MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge +class MTRTimeSynchronizationDSTOffsetListAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge { public: - MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRTimeSynchronizationDSTOffsetListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, - ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge +class MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge { public: - MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge - : public MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge +class MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge { public: - MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge( + MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::OnDone; + using MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRSwitchGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRTimeSynchronizationEventListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRTimeSynchronizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRTimeSynchronizationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge +class MTRTimeSynchronizationEventListListAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationEventListListAttributeCallbackBridge +{ +public: + MTRTimeSynchronizationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRTimeSynchronizationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRTimeSynchronizationAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRTimeSynchronizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRTimeSynchronizationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRTimeSynchronizationAttributeListListAttributeCallbackSubscriptionBridge + : public MTRTimeSynchronizationAttributeListListAttributeCallbackBridge +{ +public: + MTRTimeSynchronizationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTimeSynchronizationAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRTimeSynchronizationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTimeSynchronizationAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void + OnSuccessFn(void * context, + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value); +}; + +class MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, + ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBridgedDeviceBasicInformationEventListListAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge + : public MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge +{ +public: + MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRSwitchGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRSwitchGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge : public MTRSwitchGeneratedCommandListListAttributeCallbackBridge { public: @@ -5904,6 +7327,36 @@ class MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRSwitchEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRSwitchEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRSwitchEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRSwitchEventListListAttributeCallbackSubscriptionBridge : public MTRSwitchEventListListAttributeCallbackBridge +{ +public: + MTRSwitchEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRSwitchEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRSwitchEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRSwitchEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRSwitchAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -6002,6 +7455,39 @@ class MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubsc MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRAdministratorCommissioningEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRAdministratorCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRAdministratorCommissioningEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRAdministratorCommissioningEventListListAttributeCallbackSubscriptionBridge + : public MTRAdministratorCommissioningEventListListAttributeCallbackBridge +{ +public: + MTRAdministratorCommissioningEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAdministratorCommissioningEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRAdministratorCommissioningEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAdministratorCommissioningEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -6207,16 +7693,49 @@ class MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTROperationalCredentialsAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTROperationalCredentialsEventListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTROperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTROperationalCredentialsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTROperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTROperationalCredentialsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTROperationalCredentialsEventListListAttributeCallbackSubscriptionBridge + : public MTROperationalCredentialsEventListListAttributeCallbackBridge +{ +public: + MTROperationalCredentialsEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROperationalCredentialsEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTROperationalCredentialsEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROperationalCredentialsEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTROperationalCredentialsAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTROperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTROperationalCredentialsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; @@ -6317,350 +7836,832 @@ class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRGroupKeyManagementEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRGroupKeyManagementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRGroupKeyManagementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRGroupKeyManagementEventListListAttributeCallbackSubscriptionBridge + : public MTRGroupKeyManagementEventListListAttributeCallbackBridge +{ +public: + MTRGroupKeyManagementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGroupKeyManagementEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRGroupKeyManagementAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge + : public MTRGroupKeyManagementAttributeListListAttributeCallbackBridge +{ +public: + MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFixedLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & value); +}; + +class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRFixedLabelLabelListListAttributeCallbackBridge +{ +public: + MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFixedLabelLabelListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFixedLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelLabelListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFixedLabelEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFixedLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFixedLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFixedLabelEventListListAttributeCallbackSubscriptionBridge : public MTRFixedLabelEventListListAttributeCallbackBridge +{ +public: + MTRFixedLabelEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFixedLabelEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFixedLabelEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFixedLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge + : public MTRFixedLabelAttributeListListAttributeCallbackBridge +{ +public: + MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFixedLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFixedLabelAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRUserLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn( + void * context, + const chip::app::DataModel::DecodableList & value); +}; + +class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRUserLabelLabelListListAttributeCallbackBridge +{ +public: + MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUserLabelLabelListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRUserLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelLabelListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRUserLabelGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRUserLabelGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRUserLabelAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRUserLabelAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRUserLabelEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRUserLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRUserLabelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRUserLabelEventListListAttributeCallbackSubscriptionBridge : public MTRUserLabelEventListListAttributeCallbackBridge +{ +public: + MTRUserLabelEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUserLabelEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRUserLabelEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRUserLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public MTRUserLabelAttributeListListAttributeCallbackBridge +{ +public: + MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUserLabelAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRUserLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUserLabelAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRProxyConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRProxyConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge +class MTRProxyConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge { public: - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge( + MTRProxyConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRProxyConfigurationEventListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge +class MTRProxyConfigurationEventListListAttributeCallbackSubscriptionBridge + : public MTRProxyConfigurationEventListListAttributeCallbackBridge { public: - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRProxyConfigurationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyConfigurationEventListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRProxyConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyConfigurationEventListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRGroupKeyManagementAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRProxyConfigurationAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRProxyConfigurationAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge - : public MTRGroupKeyManagementAttributeListListAttributeCallbackBridge +class MTRProxyConfigurationAttributeListListAttributeCallbackSubscriptionBridge + : public MTRProxyConfigurationAttributeListListAttributeCallbackBridge { public: - MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge( + MTRProxyConfigurationAttributeListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRGroupKeyManagementAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRProxyConfigurationAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnDone; + using MTRProxyConfigurationAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyConfigurationAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFixedLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFixedLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRFixedLabelLabelListListAttributeCallbackBridge +class MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge { public: - MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelLabelListListAttributeCallbackBridge(queue, handler, action), + MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFixedLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFixedLabelLabelListListAttributeCallbackBridge::OnDone; + using MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge +class MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge { public: - MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRProxyDiscoveryEventListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyDiscoveryEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyDiscoveryEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge +class MTRProxyDiscoveryEventListListAttributeCallbackSubscriptionBridge + : public MTRProxyDiscoveryEventListListAttributeCallbackBridge { public: - MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRProxyDiscoveryEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyDiscoveryEventListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRProxyDiscoveryEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyDiscoveryEventListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRFixedLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRProxyDiscoveryAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyDiscoveryAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRFixedLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyDiscoveryAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge - : public MTRFixedLabelAttributeListListAttributeCallbackBridge +class MTRProxyDiscoveryAttributeListListAttributeCallbackSubscriptionBridge + : public MTRProxyDiscoveryAttributeListListAttributeCallbackBridge { public: - MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRFixedLabelAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRProxyDiscoveryAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyDiscoveryAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRFixedLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRFixedLabelAttributeListListAttributeCallbackBridge::OnDone; + using MTRProxyDiscoveryAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyDiscoveryAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRUserLabelLabelListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRProxyValidGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyValidGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRUserLabelLabelListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyValidGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn( - void * context, - const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge : public MTRUserLabelLabelListListAttributeCallbackBridge +class MTRProxyValidGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRProxyValidGeneratedCommandListListAttributeCallbackBridge { public: - MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelLabelListListAttributeCallbackBridge(queue, handler, action), + MTRProxyValidGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyValidGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRUserLabelLabelListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUserLabelLabelListListAttributeCallbackBridge::OnDone; + using MTRProxyValidGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyValidGeneratedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRUserLabelGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRProxyValidAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyValidAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRProxyValidAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRUserLabelGeneratedCommandListListAttributeCallbackBridge +class MTRProxyValidAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRProxyValidAcceptedCommandListListAttributeCallbackBridge { public: - MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRProxyValidAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRProxyValidAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnDone; + using MTRProxyValidAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyValidAcceptedCommandListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRUserLabelAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRProxyValidEventListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyValidEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyValidEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRUserLabelAcceptedCommandListListAttributeCallbackBridge +class MTRProxyValidEventListListAttributeCallbackSubscriptionBridge : public MTRProxyValidEventListListAttributeCallbackBridge { public: - MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRProxyValidEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyValidEventListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRProxyValidEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyValidEventListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRUserLabelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge +class MTRProxyValidAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: - MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRProxyValidAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRUserLabelAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + MTRProxyValidAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge : public MTRUserLabelAttributeListListAttributeCallbackBridge +class MTRProxyValidAttributeListListAttributeCallbackSubscriptionBridge + : public MTRProxyValidAttributeListListAttributeCallbackBridge { public: - MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRUserLabelAttributeListListAttributeCallbackBridge(queue, handler, action), + MTRProxyValidAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRProxyValidAttributeListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRUserLabelAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRUserLabelAttributeListListAttributeCallbackBridge::OnDone; + using MTRProxyValidAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRProxyValidAttributeListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -6732,6 +8733,36 @@ class MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBooleanStateEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRBooleanStateEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBooleanStateEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBooleanStateEventListListAttributeCallbackSubscriptionBridge : public MTRBooleanStateEventListListAttributeCallbackBridge +{ +public: + MTRBooleanStateEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBooleanStateEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBooleanStateEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBooleanStateEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBooleanStateAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -6866,6 +8897,36 @@ class MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRModeSelectEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRModeSelectEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRModeSelectEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRModeSelectEventListListAttributeCallbackSubscriptionBridge : public MTRModeSelectEventListListAttributeCallbackBridge +{ +public: + MTRModeSelectEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRModeSelectEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRModeSelectEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRModeSelectEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRModeSelectAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -7095,6 +9156,36 @@ class MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRDoorLockEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRDoorLockEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRDoorLockEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRDoorLockEventListListAttributeCallbackSubscriptionBridge : public MTRDoorLockEventListListAttributeCallbackBridge +{ +public: + MTRDoorLockEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRDoorLockEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRDoorLockEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRDoorLockEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRDoorLockAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -7298,16 +9389,47 @@ class MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridg : public MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge { public: - MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRWindowCoveringEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRWindowCoveringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWindowCoveringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWindowCoveringEventListListAttributeCallbackSubscriptionBridge + : public MTRWindowCoveringEventListListAttributeCallbackBridge +{ +public: + MTRWindowCoveringEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWindowCoveringEventListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRWindowCoveringEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWindowCoveringEventListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -7412,6 +9534,37 @@ class MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridg MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBarrierControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRBarrierControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBarrierControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBarrierControlEventListListAttributeCallbackSubscriptionBridge + : public MTRBarrierControlEventListListAttributeCallbackBridge +{ +public: + MTRBarrierControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBarrierControlEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBarrierControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBarrierControlEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBarrierControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7547,6 +9700,39 @@ class MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubs MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPumpConfigurationAndControlEventListListAttributeCallbackSubscriptionBridge + : public MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge +{ +public: + MTRPumpConfigurationAndControlEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7646,6 +9832,36 @@ class MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRThermostatEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRThermostatEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRThermostatEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRThermostatEventListListAttributeCallbackSubscriptionBridge : public MTRThermostatEventListListAttributeCallbackBridge +{ +public: + MTRThermostatEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRThermostatEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRThermostatAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -7743,6 +9959,36 @@ class MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRFanControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFanControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFanControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFanControlEventListListAttributeCallbackSubscriptionBridge : public MTRFanControlEventListListAttributeCallbackBridge +{ +public: + MTRFanControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFanControlEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFanControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFanControlEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRFanControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -7848,6 +10094,40 @@ class MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCal MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackSubscriptionBridge + : public MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge +{ +public: + MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -7949,6 +10229,36 @@ class MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRColorControlEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRColorControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRColorControlEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRColorControlEventListListAttributeCallbackSubscriptionBridge : public MTRColorControlEventListListAttributeCallbackBridge +{ +public: + MTRColorControlEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRColorControlEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRColorControlEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRColorControlEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRColorControlAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8048,6 +10358,39 @@ class MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptio MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRBallastConfigurationEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRBallastConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRBallastConfigurationEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRBallastConfigurationEventListListAttributeCallbackSubscriptionBridge + : public MTRBallastConfigurationEventListListAttributeCallbackBridge +{ +public: + MTRBallastConfigurationEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRBallastConfigurationEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRBallastConfigurationEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRBallastConfigurationEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRBallastConfigurationAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8147,6 +10490,39 @@ class MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRIlluminanceMeasurementEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRIlluminanceMeasurementEventListListAttributeCallbackSubscriptionBridge + : public MTRIlluminanceMeasurementEventListListAttributeCallbackBridge +{ +public: + MTRIlluminanceMeasurementEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRIlluminanceMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRIlluminanceMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRIlluminanceMeasurementEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8246,6 +10622,39 @@ class MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscript MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRTemperatureMeasurementEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRTemperatureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRTemperatureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRTemperatureMeasurementEventListListAttributeCallbackSubscriptionBridge + : public MTRTemperatureMeasurementEventListListAttributeCallbackBridge +{ +public: + MTRTemperatureMeasurementEventListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTemperatureMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRTemperatureMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTemperatureMeasurementEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8345,6 +10754,39 @@ class MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscription MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRPressureMeasurementEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRPressureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRPressureMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRPressureMeasurementEventListListAttributeCallbackSubscriptionBridge + : public MTRPressureMeasurementEventListListAttributeCallbackBridge +{ +public: + MTRPressureMeasurementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRPressureMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRPressureMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRPressureMeasurementEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRPressureMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8444,6 +10886,38 @@ class MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBrid MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRFlowMeasurementEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFlowMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFlowMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFlowMeasurementEventListListAttributeCallbackSubscriptionBridge + : public MTRFlowMeasurementEventListListAttributeCallbackBridge +{ +public: + MTRFlowMeasurementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFlowMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFlowMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFlowMeasurementEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRFlowMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8511,35 +10985,68 @@ class MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSub MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge +class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, + OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge + : public MTRCallbackBridge { public: - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; + MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action) : - MTRCallbackBridge(queue, handler, action, - OnSuccessFn){}; + MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge +class MTRRelativeHumidityMeasurementEventListListAttributeCallbackSubscriptionBridge + : public MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge { public: - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge( + MTRRelativeHumidityMeasurementEventListListAttributeCallbackSubscriptionBridge( dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, MTRSubscriptionEstablishedHandler establishedHandler) : - MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -8707,6 +11214,39 @@ class MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBri MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTROccupancySensingEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTROccupancySensingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTROccupancySensingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTROccupancySensingEventListListAttributeCallbackSubscriptionBridge + : public MTROccupancySensingEventListListAttributeCallbackBridge +{ +public: + MTROccupancySensingEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTROccupancySensingEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTROccupancySensingEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTROccupancySensingEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTROccupancySensingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -8806,6 +11346,36 @@ class MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRWakeOnLANEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRWakeOnLANEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRWakeOnLANEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRWakeOnLANEventListListAttributeCallbackSubscriptionBridge : public MTRWakeOnLANEventListListAttributeCallbackBridge +{ +public: + MTRWakeOnLANEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRWakeOnLANEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRWakeOnLANEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRWakeOnLANEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRWakeOnLANAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -8999,6 +11569,36 @@ class MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRChannelEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRChannelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRChannelEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRChannelEventListListAttributeCallbackSubscriptionBridge : public MTRChannelEventListListAttributeCallbackBridge +{ +public: + MTRChannelEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRChannelEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRChannelEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRChannelEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRChannelAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -9131,6 +11731,38 @@ class MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBrid MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRTargetNavigatorEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRTargetNavigatorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRTargetNavigatorEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRTargetNavigatorEventListListAttributeCallbackSubscriptionBridge + : public MTRTargetNavigatorEventListListAttributeCallbackBridge +{ +public: + MTRTargetNavigatorEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRTargetNavigatorEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRTargetNavigatorEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRTargetNavigatorEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRTargetNavigatorAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -9266,6 +11898,36 @@ class MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRMediaPlaybackEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRMediaPlaybackEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRMediaPlaybackEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRMediaPlaybackEventListListAttributeCallbackSubscriptionBridge : public MTRMediaPlaybackEventListListAttributeCallbackBridge +{ +public: + MTRMediaPlaybackEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaPlaybackEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRMediaPlaybackEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaPlaybackEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRMediaPlaybackAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -9398,6 +12060,36 @@ class MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRMediaInputEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRMediaInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRMediaInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRMediaInputEventListListAttributeCallbackSubscriptionBridge : public MTRMediaInputEventListListAttributeCallbackBridge +{ +public: + MTRMediaInputEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRMediaInputEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRMediaInputEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRMediaInputEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRMediaInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -9495,6 +12187,36 @@ class MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRLowPowerEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRLowPowerEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRLowPowerEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRLowPowerEventListListAttributeCallbackSubscriptionBridge : public MTRLowPowerEventListListAttributeCallbackBridge +{ +public: + MTRLowPowerEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRLowPowerEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRLowPowerEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRLowPowerEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRLowPowerAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { public: @@ -9591,6 +12313,36 @@ class MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRKeypadInputEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRKeypadInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRKeypadInputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRKeypadInputEventListListAttributeCallbackSubscriptionBridge : public MTRKeypadInputEventListListAttributeCallbackBridge +{ +public: + MTRKeypadInputEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRKeypadInputEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRKeypadInputEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRKeypadInputEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRKeypadInputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -9722,6 +12474,38 @@ class MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBrid MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRContentLauncherEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRContentLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRContentLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRContentLauncherEventListListAttributeCallbackSubscriptionBridge + : public MTRContentLauncherEventListListAttributeCallbackBridge +{ +public: + MTRContentLauncherEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRContentLauncherEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRContentLauncherEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRContentLauncherEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRContentLauncherAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -9854,6 +12638,36 @@ class MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRAudioOutputEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRAudioOutputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRAudioOutputEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRAudioOutputEventListListAttributeCallbackSubscriptionBridge : public MTRAudioOutputEventListListAttributeCallbackBridge +{ +public: + MTRAudioOutputEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAudioOutputEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRAudioOutputEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAudioOutputEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRAudioOutputAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -10020,6 +12834,39 @@ class MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscription MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRApplicationLauncherEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRApplicationLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRApplicationLauncherEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRApplicationLauncherEventListListAttributeCallbackSubscriptionBridge + : public MTRApplicationLauncherEventListListAttributeCallbackBridge +{ +public: + MTRApplicationLauncherEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationLauncherEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRApplicationLauncherEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationLauncherEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRApplicationLauncherAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -10164,23 +13011,56 @@ class MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge MTRActionBlock action) : MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; - static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRApplicationBasicEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRApplicationBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRApplicationBasicEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); }; -class MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge +class MTRApplicationBasicEventListListAttributeCallbackSubscriptionBridge + : public MTRApplicationBasicEventListListAttributeCallbackBridge { public: - MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + MTRApplicationBasicEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRApplicationBasicEventListListAttributeCallbackBridge(queue, handler, action), mEstablishedHandler(establishedHandler) {} void OnSubscriptionEstablished(); - using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnDone; + using MTRApplicationBasicEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRApplicationBasicEventListListAttributeCallbackBridge::OnDone; private: MTRSubscriptionEstablishedHandler mEstablishedHandler; @@ -10285,6 +13165,36 @@ class MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRAccountLoginEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRAccountLoginEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRAccountLoginEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRAccountLoginEventListListAttributeCallbackSubscriptionBridge : public MTRAccountLoginEventListListAttributeCallbackBridge +{ +public: + MTRAccountLoginEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRAccountLoginEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRAccountLoginEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRAccountLoginEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRAccountLoginAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -10384,6 +13294,39 @@ class MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscripti MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRElectricalMeasurementEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRElectricalMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRElectricalMeasurementEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRElectricalMeasurementEventListListAttributeCallbackSubscriptionBridge + : public MTRElectricalMeasurementEventListListAttributeCallbackBridge +{ +public: + MTRElectricalMeasurementEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRElectricalMeasurementEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRElectricalMeasurementEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRElectricalMeasurementEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRElectricalMeasurementAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -10417,6 +13360,173 @@ class MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBrid MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRClientMonitoringExpectedClientsListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRClientMonitoringExpectedClientsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRClientMonitoringExpectedClientsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> & value); +}; + +class MTRClientMonitoringExpectedClientsListAttributeCallbackSubscriptionBridge + : public MTRClientMonitoringExpectedClientsListAttributeCallbackBridge +{ +public: + MTRClientMonitoringExpectedClientsListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRClientMonitoringExpectedClientsListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRClientMonitoringExpectedClientsListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRClientMonitoringExpectedClientsListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRClientMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRClientMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRClientMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRClientMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRClientMonitoringEventListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRClientMonitoringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRClientMonitoringEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRClientMonitoringEventListListAttributeCallbackSubscriptionBridge + : public MTRClientMonitoringEventListListAttributeCallbackBridge +{ +public: + MTRClientMonitoringEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRClientMonitoringEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRClientMonitoringEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRClientMonitoringEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRClientMonitoringAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRClientMonitoringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRClientMonitoringAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRClientMonitoringAttributeListListAttributeCallbackSubscriptionBridge + : public MTRClientMonitoringAttributeListListAttributeCallbackBridge +{ +public: + MTRClientMonitoringAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRClientMonitoringAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRClientMonitoringAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRClientMonitoringAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRUnitTestingBitmap8AttributeCallbackBridge : public MTRCallbackBridge { public: @@ -11002,6 +14112,36 @@ class MTRUnitTestingAcceptedCommandListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRUnitTestingEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRUnitTestingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRUnitTestingEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRUnitTestingEventListListAttributeCallbackSubscriptionBridge : public MTRUnitTestingEventListListAttributeCallbackBridge +{ +public: + MTRUnitTestingEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRUnitTestingEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRUnitTestingEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRUnitTestingEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRUnitTestingAttributeListListAttributeCallbackBridge : public MTRCallbackBridge { @@ -11034,6 +14174,136 @@ class MTRUnitTestingAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; +class MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge +{ +public: + MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge +{ +public: + MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge( + dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFaultInjectionEventListListAttributeCallbackBridge : public MTRCallbackBridge +{ +public: + MTRFaultInjectionEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFaultInjectionEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFaultInjectionEventListListAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionEventListListAttributeCallbackBridge +{ +public: + MTRFaultInjectionEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionEventListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFaultInjectionEventListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFaultInjectionEventListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + +class MTRFaultInjectionAttributeListListAttributeCallbackBridge + : public MTRCallbackBridge +{ +public: + MTRFaultInjectionAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : + MTRCallbackBridge(queue, handler, OnSuccessFn){}; + + MTRFaultInjectionAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action) : + MTRCallbackBridge(queue, handler, action, OnSuccessFn){}; + + static void OnSuccessFn(void * context, const chip::app::DataModel::DecodableList & value); +}; + +class MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge + : public MTRFaultInjectionAttributeListListAttributeCallbackBridge +{ +public: + MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + MTRActionBlock action, + MTRSubscriptionEstablishedHandler establishedHandler) : + MTRFaultInjectionAttributeListListAttributeCallbackBridge(queue, handler, action), + mEstablishedHandler(establishedHandler) + {} + + void OnSubscriptionEstablished(); + using MTRFaultInjectionAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; + using MTRFaultInjectionAttributeListListAttributeCallbackBridge::OnDone; + +private: + MTRSubscriptionEstablishedHandler mEstablishedHandler; +}; + class MTRGroupsClusterAddGroupResponseCallbackBridge : public MTRCallbackBridge { public: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 0fecca0312771c..3813cbfe660cc4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -779,6 +779,44 @@ } } +void MTRIdentifyEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRIdentifyEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRIdentifyAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -893,8 +931,8 @@ } } -void MTRGroupsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -916,7 +954,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -931,8 +969,8 @@ } } -void MTRScenesGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -954,7 +992,7 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -969,7 +1007,7 @@ } } -void MTRScenesAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRScenesGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -992,7 +1030,7 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1007,8 +1045,8 @@ } } -void MTRScenesAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRScenesAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1030,7 +1068,7 @@ DispatchSuccess(context, objCValue); }; -void MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1045,8 +1083,8 @@ } } -void MTROnOffGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRScenesEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1068,7 +1106,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1083,8 +1121,8 @@ } } -void MTROnOffAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRScenesAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1106,7 +1144,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRScenesAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1121,8 +1159,8 @@ } } -void MTROnOffAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROnOffGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1144,7 +1182,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1159,7 +1197,7 @@ } } -void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROnOffAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1182,7 +1220,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1197,8 +1235,8 @@ } } -void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROnOffEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1220,7 +1258,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1235,7 +1273,7 @@ } } -void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTROnOffAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1258,7 +1296,7 @@ DispatchSuccess(context, objCValue); }; -void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1273,15 +1311,30 @@ } } -void MTRLevelControlOptionsAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRLevelControlOptionsAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffSwitchConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1296,7 +1349,7 @@ } } -void MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1319,7 +1372,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffSwitchConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1334,8 +1387,8 @@ } } -void MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROnOffSwitchConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1357,7 +1410,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffSwitchConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1372,7 +1425,7 @@ } } -void MTRLevelControlAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1395,7 +1448,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROnOffSwitchConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1410,7 +1463,30 @@ } } -void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRLevelControlOptionsAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRLevelControlOptionsAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLevelControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1433,7 +1509,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1448,7 +1524,7 @@ } } -void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRLevelControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1471,7 +1547,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1486,8 +1562,8 @@ } } -void MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRLevelControlEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1509,7 +1585,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1524,8 +1600,8 @@ } } -void MTRDescriptorDeviceTypeListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRLevelControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1533,10 +1609,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRDescriptorClusterDeviceTypeStruct * newElement_0; - newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; - newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; - newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1549,7 +1623,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLevelControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1564,8 +1638,8 @@ } } -void MTRDescriptorServerListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1587,7 +1661,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBinaryInputBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1602,8 +1676,8 @@ } } -void MTRDescriptorClientListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1625,7 +1699,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBinaryInputBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1640,8 +1714,8 @@ } } -void MTRDescriptorPartsListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBinaryInputBasicEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1650,7 +1724,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1663,7 +1737,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBinaryInputBasicEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1678,8 +1752,8 @@ } } -void MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBinaryInputBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1701,7 +1775,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBinaryInputBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1716,7 +1790,7 @@ } } -void MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -1739,7 +1813,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPulseWidthModulationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1754,8 +1828,8 @@ } } -void MTRDescriptorAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1777,7 +1851,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPulseWidthModulationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1792,8 +1866,8 @@ } } -void MTRBindingBindingListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRPulseWidthModulationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1801,29 +1875,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRBindingClusterTargetStruct * newElement_0; - newElement_0 = [MTRBindingClusterTargetStruct new]; - if (entry_0.node.HasValue()) { - newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; - } else { - newElement_0.node = nil; - } - if (entry_0.group.HasValue()) { - newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; - } else { - newElement_0.group = nil; - } - if (entry_0.endpoint.HasValue()) { - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; - } else { - newElement_0.endpoint = nil; - } - if (entry_0.cluster.HasValue()) { - newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; - } else { - newElement_0.cluster = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1836,7 +1889,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPulseWidthModulationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1851,8 +1904,8 @@ } } -void MTRBindingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPulseWidthModulationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1874,7 +1927,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPulseWidthModulationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1889,8 +1942,8 @@ } } -void MTRBindingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorDeviceTypeListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1898,8 +1951,10 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRDescriptorClusterDeviceTypeStruct * newElement_0; + newElement_0 = [MTRDescriptorClusterDeviceTypeStruct new]; + newElement_0.deviceType = [NSNumber numberWithUnsignedInt:entry_0.deviceType]; + newElement_0.revision = [NSNumber numberWithUnsignedShort:entry_0.revision]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -1912,7 +1967,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorDeviceTypeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1927,8 +1982,8 @@ } } -void MTRBindingAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorServerListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1950,7 +2005,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorServerListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -1965,9 +2020,8 @@ } } -void MTRAccessControlACLListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & value) +void MTRDescriptorClientListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -1975,66 +2029,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlEntryStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; - newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; - newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; - if (entry_0.subjects.IsNull()) { - newElement_0.subjects = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.subjects.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - NSNumber * newElement_3; - newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.subjects = array_3; - } - } - if (entry_0.targets.IsNull()) { - newElement_0.targets = nil; - } else { - { // Scope for our temporary variables - auto * array_3 = [NSMutableArray new]; - auto iter_3 = entry_0.targets.Value().begin(); - while (iter_3.Next()) { - auto & entry_3 = iter_3.GetValue(); - MTRAccessControlClusterTarget * newElement_3; - newElement_3 = [MTRAccessControlClusterTarget new]; - if (entry_3.cluster.IsNull()) { - newElement_3.cluster = nil; - } else { - newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; - } - if (entry_3.endpoint.IsNull()) { - newElement_3.endpoint = nil; - } else { - newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; - } - if (entry_3.deviceType.IsNull()) { - newElement_3.deviceType = nil; - } else { - newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; - } - [array_3 addObject:newElement_3]; - } - CHIP_ERROR err = iter_3.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.targets = array_3; - } - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2047,7 +2043,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlACLListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorClientListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2062,9 +2058,8 @@ } } -void MTRAccessControlExtensionListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & value) +void MTRDescriptorPartsListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2072,10 +2067,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; - newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; - newElement_0.data = [NSData dataWithBytes:entry_0.data.data() length:entry_0.data.size()]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2088,7 +2081,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorPartsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2103,7 +2096,7 @@ } } -void MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRDescriptorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2126,7 +2119,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2141,7 +2134,7 @@ } } -void MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRDescriptorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2164,7 +2157,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2179,8 +2172,8 @@ } } -void MTRAccessControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDescriptorEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2202,7 +2195,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2217,8 +2210,8 @@ } } -void MTRActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRDescriptorAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2226,16 +2219,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRActionsClusterActionStruct * newElement_0; - newElement_0 = [MTRActionsClusterActionStruct new]; - newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands.Raw()]; - newElement_0.state = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.state)]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2248,7 +2233,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDescriptorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2263,8 +2248,8 @@ } } -void MTRActionsEndpointListsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRBindingBindingListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2272,29 +2257,29 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRActionsClusterEndpointListStruct * newElement_0; - newElement_0 = [MTRActionsClusterEndpointListStruct new]; - newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.endpoints = array_2; + MTRBindingClusterTargetStruct * newElement_0; + newElement_0 = [MTRBindingClusterTargetStruct new]; + if (entry_0.node.HasValue()) { + newElement_0.node = [NSNumber numberWithUnsignedLongLong:entry_0.node.Value()]; + } else { + newElement_0.node = nil; } + if (entry_0.group.HasValue()) { + newElement_0.group = [NSNumber numberWithUnsignedShort:entry_0.group.Value()]; + } else { + newElement_0.group = nil; + } + if (entry_0.endpoint.HasValue()) { + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint.Value()]; + } else { + newElement_0.endpoint = nil; + } + if (entry_0.cluster.HasValue()) { + newElement_0.cluster = [NSNumber numberWithUnsignedInt:entry_0.cluster.Value()]; + } else { + newElement_0.cluster = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2307,7 +2292,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingBindingListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2322,7 +2307,7 @@ } } -void MTRActionsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBindingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2345,7 +2330,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2360,7 +2345,7 @@ } } -void MTRActionsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBindingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2383,7 +2368,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2398,8 +2383,8 @@ } } -void MTRActionsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBindingEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2421,7 +2406,7 @@ DispatchSuccess(context, objCValue); }; -void MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2436,17 +2421,30 @@ } } -void MTRBasicInformationCapabilityMinimaStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType & value) +void MTRBindingAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRBasicInformationClusterCapabilityMinimaStruct * _Nonnull objCValue; - objCValue = [MTRBasicInformationClusterCapabilityMinimaStruct new]; - objCValue.caseSessionsPerFabric = [NSNumber numberWithUnsignedShort:value.caseSessionsPerFabric]; - objCValue.subscriptionsPerFabric = [NSNumber numberWithUnsignedShort:value.subscriptionsPerFabric]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRBasicInformationCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBindingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2461,21 +2459,3351 @@ } } -void MTRBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +void MTRAccessControlACLListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> & value) { - MTRBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; - objCValue = [MTRBasicInformationClusterProductAppearanceStruct new]; - objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; - if (value.primaryColor.IsNull()) { - objCValue.primaryColor = nil; - } else { - objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRAccessControlClusterAccessControlEntryStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlEntryStruct new]; + newElement_0.privilege = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.privilege)]; + newElement_0.authMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.authMode)]; + if (entry_0.subjects.IsNull()) { + newElement_0.subjects = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.subjects.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + NSNumber * newElement_3; + newElement_3 = [NSNumber numberWithUnsignedLongLong:entry_3]; + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.subjects = array_3; + } + } + if (entry_0.targets.IsNull()) { + newElement_0.targets = nil; + } else { + { // Scope for our temporary variables + auto * array_3 = [NSMutableArray new]; + auto iter_3 = entry_0.targets.Value().begin(); + while (iter_3.Next()) { + auto & entry_3 = iter_3.GetValue(); + MTRAccessControlClusterTarget * newElement_3; + newElement_3 = [MTRAccessControlClusterTarget new]; + if (entry_3.cluster.IsNull()) { + newElement_3.cluster = nil; + } else { + newElement_3.cluster = [NSNumber numberWithUnsignedInt:entry_3.cluster.Value()]; + } + if (entry_3.endpoint.IsNull()) { + newElement_3.endpoint = nil; + } else { + newElement_3.endpoint = [NSNumber numberWithUnsignedShort:entry_3.endpoint.Value()]; + } + if (entry_3.deviceType.IsNull()) { + newElement_3.deviceType = nil; + } else { + newElement_3.deviceType = [NSNumber numberWithUnsignedInt:entry_3.deviceType.Value()]; + } + [array_3 addObject:newElement_3]; + } + CHIP_ERROR err = iter_3.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.targets = array_3; + } + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRAccessControlACLListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRAccessControlExtensionListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRAccessControlClusterAccessControlExtensionStruct * newElement_0; + newElement_0 = [MTRAccessControlClusterAccessControlExtensionStruct new]; + newElement_0.data = [NSData dataWithBytes:entry_0.data.data() length:entry_0.data.size()]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRAccessControlExtensionListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRAccessControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRAccessControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRAccessControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRAccessControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRAccessControlEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRAccessControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRAccessControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRAccessControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRActionsActionListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRActionsClusterActionStruct * newElement_0; + newElement_0 = [MTRActionsClusterActionStruct new]; + newElement_0.actionID = [NSNumber numberWithUnsignedShort:entry_0.actionID]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.supportedCommands = [NSNumber numberWithUnsignedShort:entry_0.supportedCommands.Raw()]; + newElement_0.state = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.state)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRActionsActionListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRActionsEndpointListsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRActionsClusterEndpointListStruct * newElement_0; + newElement_0 = [MTRActionsClusterEndpointListStruct new]; + newElement_0.endpointListID = [NSNumber numberWithUnsignedShort:entry_0.endpointListID]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.endpoints = array_2; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRActionsEndpointListsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRActionsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRActionsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRActionsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRActionsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRActionsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRActionsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRActionsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRActionsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationCapabilityMinimaStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::BasicInformation::Structs::CapabilityMinimaStruct::DecodableType & value) +{ + MTRBasicInformationClusterCapabilityMinimaStruct * _Nonnull objCValue; + objCValue = [MTRBasicInformationClusterCapabilityMinimaStruct new]; + objCValue.caseSessionsPerFabric = [NSNumber numberWithUnsignedShort:value.caseSessionsPerFabric]; + objCValue.subscriptionsPerFabric = [NSNumber numberWithUnsignedShort:value.subscriptionsPerFabric]; + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationCapabilityMinimaStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::BasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + MTRBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; + objCValue = [MTRBasicInformationClusterProductAppearanceStruct new]; + objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; + if (value.primaryColor.IsNull()) { + objCValue.primaryColor = nil; + } else { + objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateProviderEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateProviderEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateRequestorEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateRequestorEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSString * newElement_0; + newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLocalizationConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLocalizationConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTimeFormatLocalizationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTimeFormatLocalizationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRUnitLocalizationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRUnitLocalizationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRUnitLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPowerSourceAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType & value) +{ + MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull objCValue; + objCValue = [MTRGeneralCommissioningClusterBasicCommissioningInfo new]; + objCValue.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:value.failSafeExpiryLengthSeconds]; + objCValue.maxCumulativeFailsafeSeconds = [NSNumber numberWithUnsignedShort:value.maxCumulativeFailsafeSeconds]; + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralCommissioningEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralCommissioningEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNetworkCommissioningNetworksListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRNetworkCommissioningClusterNetworkInfo * newElement_0; + newElement_0 = [MTRNetworkCommissioningClusterNetworkInfo new]; + newElement_0.networkID = [NSData dataWithBytes:entry_0.networkID.data() length:entry_0.networkID.size()]; + newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNetworkCommissioningEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNetworkCommissioningEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRDiagnosticLogsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRDiagnosticLogsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRGeneralDiagnosticsClusterNetworkInterface * newElement_0; + newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterface new]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; + if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { + newElement_0.offPremiseServicesReachableIPv4 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv4 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; + } + if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { + newElement_0.offPremiseServicesReachableIPv6 = nil; + } else { + newElement_0.offPremiseServicesReachableIPv6 = + [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; + } + newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() + length:entry_0.hardwareAddress.size()]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv4Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.iPv4Addresses = array_2; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.IPv6Addresses.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSData * newElement_2; + newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.iPv6Addresses = array_2; + } + newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRSoftwareDiagnosticsClusterThreadMetricsStruct * newElement_0; + newElement_0 = [MTRSoftwareDiagnosticsClusterThreadMetricsStruct new]; + newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + if (entry_0.stackFreeCurrent.HasValue()) { + newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent.Value()]; + } else { + newElement_0.stackFreeCurrent = nil; + } + if (entry_0.stackFreeMinimum.HasValue()) { + newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum.Value()]; + } else { + newElement_0.stackFreeMinimum = nil; + } + if (entry_0.stackSize.HasValue()) { + newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize.Value()]; + } else { + newElement_0.stackSize = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRSoftwareDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRSoftwareDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRThreadNetworkDiagnosticsClusterNeighborTable * newElement_0; + newElement_0 = [MTRThreadNetworkDiagnosticsClusterNeighborTable new]; + newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; + newElement_0.age = [NSNumber numberWithUnsignedInt:entry_0.age]; + newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; + newElement_0.linkFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.linkFrameCounter]; + newElement_0.mleFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.mleFrameCounter]; + newElement_0.lqi = [NSNumber numberWithUnsignedChar:entry_0.lqi]; + if (entry_0.averageRssi.IsNull()) { + newElement_0.averageRssi = nil; + } else { + newElement_0.averageRssi = [NSNumber numberWithChar:entry_0.averageRssi.Value()]; + } + if (entry_0.lastRssi.IsNull()) { + newElement_0.lastRssi = nil; + } else { + newElement_0.lastRssi = [NSNumber numberWithChar:entry_0.lastRssi.Value()]; + } + newElement_0.frameErrorRate = [NSNumber numberWithUnsignedChar:entry_0.frameErrorRate]; + newElement_0.messageErrorRate = [NSNumber numberWithUnsignedChar:entry_0.messageErrorRate]; + newElement_0.rxOnWhenIdle = [NSNumber numberWithBool:entry_0.rxOnWhenIdle]; + newElement_0.fullThreadDevice = [NSNumber numberWithBool:entry_0.fullThreadDevice]; + newElement_0.fullNetworkData = [NSNumber numberWithBool:entry_0.fullNetworkData]; + newElement_0.isChild = [NSNumber numberWithBool:entry_0.isChild]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRThreadNetworkDiagnosticsClusterRouteTable * newElement_0; + newElement_0 = [MTRThreadNetworkDiagnosticsClusterRouteTable new]; + newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; + newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; + newElement_0.routerId = [NSNumber numberWithUnsignedChar:entry_0.routerId]; + newElement_0.nextHop = [NSNumber numberWithUnsignedChar:entry_0.nextHop]; + newElement_0.pathCost = [NSNumber numberWithUnsignedChar:entry_0.pathCost]; + newElement_0.lqiIn = [NSNumber numberWithUnsignedChar:entry_0.LQIIn]; + newElement_0.lqiOut = [NSNumber numberWithUnsignedChar:entry_0.LQIOut]; + newElement_0.age = [NSNumber numberWithUnsignedChar:entry_0.age]; + newElement_0.allocated = [NSNumber numberWithBool:entry_0.allocated]; + newElement_0.linkEstablished = [NSNumber numberWithBool:entry_0.linkEstablished]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & + value) +{ + MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRThreadNetworkDiagnosticsClusterSecurityPolicy new]; + objCValue.rotationTime = [NSNumber numberWithUnsignedShort:value.Value().rotationTime]; + objCValue.flags = [NSNumber numberWithUnsignedShort:value.Value().flags]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable< + chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & value) +{ + MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents new]; + objCValue.activeTimestampPresent = [NSNumber numberWithBool:value.Value().activeTimestampPresent]; + objCValue.pendingTimestampPresent = [NSNumber numberWithBool:value.Value().pendingTimestampPresent]; + objCValue.masterKeyPresent = [NSNumber numberWithBool:value.Value().masterKeyPresent]; + objCValue.networkNamePresent = [NSNumber numberWithBool:value.Value().networkNamePresent]; + objCValue.extendedPanIdPresent = [NSNumber numberWithBool:value.Value().extendedPanIdPresent]; + objCValue.meshLocalPrefixPresent = [NSNumber numberWithBool:value.Value().meshLocalPrefixPresent]; + objCValue.delayPresent = [NSNumber numberWithBool:value.Value().delayPresent]; + objCValue.panIdPresent = [NSNumber numberWithBool:value.Value().panIdPresent]; + objCValue.channelPresent = [NSNumber numberWithBool:value.Value().channelPresent]; + objCValue.pskcPresent = [NSNumber numberWithBool:value.Value().pskcPresent]; + objCValue.securityPolicyPresent = [NSNumber numberWithBool:value.Value().securityPolicyPresent]; + objCValue.channelMaskPresent = [NSNumber numberWithBool:value.Value().channelMaskPresent]; } DispatchSuccess(context, objCValue); }; -void MTRBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2490,8 +5818,8 @@ } } -void MTRBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2500,7 +5828,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2513,7 +5841,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2528,7 +5856,7 @@ } } -void MTRBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -2551,7 +5879,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2566,8 +5894,8 @@ } } -void MTRBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2589,7 +5917,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2604,8 +5932,8 @@ } } -void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2627,7 +5955,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2642,8 +5970,8 @@ } } -void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2665,7 +5993,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2680,8 +6008,8 @@ } } -void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2703,7 +6031,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateProviderAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2718,9 +6046,8 @@ } } -void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::DecodableType> & value) +void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2728,11 +6055,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; - newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2745,7 +6069,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorDefaultOTAProvidersListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2760,8 +6084,8 @@ } } -void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2783,7 +6107,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2798,8 +6122,8 @@ } } -void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2821,7 +6145,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2836,8 +6160,8 @@ } } -void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2859,7 +6183,7 @@ DispatchSuccess(context, objCValue); }; -void MTROTASoftwareUpdateRequestorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2874,8 +6198,8 @@ } } -void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2883,8 +6207,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSString * newElement_0; - newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -2897,7 +6221,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationSupportedLocalesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2912,8 +6236,8 @@ } } -void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTREthernetNetworkDiagnosticsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2935,7 +6259,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2950,8 +6274,8 @@ } } -void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2973,7 +6297,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -2988,8 +6312,9 @@ } } -void MTRLocalizationConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTimeSynchronizationTimeZoneListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -2997,8 +6322,17 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3011,7 +6345,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLocalizationConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationTimeZoneListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3026,8 +6360,9 @@ } } -void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRTimeSynchronizationDSTOffsetListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3035,8 +6370,11 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; + newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3049,7 +6387,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationSupportedCalendarTypesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationDSTOffsetListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3064,7 +6402,7 @@ } } -void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3087,7 +6425,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3102,7 +6440,7 @@ } } -void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3125,7 +6463,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3140,8 +6478,8 @@ } } -void MTRTimeFormatLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTimeSynchronizationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3163,7 +6501,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTimeFormatLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3178,8 +6516,8 @@ } } -void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTimeSynchronizationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3201,7 +6539,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTimeSynchronizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3216,7 +6554,36 @@ } } -void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +{ + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; + objCValue = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; + objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; + if (value.primaryColor.IsNull()) { + objCValue.primaryColor = nil; + } else { + objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + } + DispatchSuccess(context, objCValue); +}; + +void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3239,7 +6606,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3254,8 +6621,8 @@ } } -void MTRUnitLocalizationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3277,7 +6644,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUnitLocalizationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3292,8 +6659,8 @@ } } -void MTRPowerSourceConfigurationSourcesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBridgedDeviceBasicInformationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3302,7 +6669,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3315,7 +6682,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationSourcesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3330,8 +6697,8 @@ } } -void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3353,7 +6720,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3368,7 +6735,7 @@ } } -void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRSwitchGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3391,7 +6758,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3406,8 +6773,8 @@ } } -void MTRPowerSourceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRSwitchAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3429,7 +6796,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3444,8 +6811,8 @@ } } -void MTRPowerSourceActiveWiredFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRSwitchEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3454,7 +6821,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3467,7 +6834,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveWiredFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSwitchEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3482,8 +6849,8 @@ } } -void MTRPowerSourceActiveBatFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRSwitchAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3492,7 +6859,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3505,7 +6872,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveBatFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3520,8 +6887,8 @@ } } -void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3530,7 +6897,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3543,7 +6910,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceActiveBatChargeFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3558,7 +6925,7 @@ } } -void MTRPowerSourceGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3581,7 +6948,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3596,8 +6963,8 @@ } } -void MTRPowerSourceAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAdministratorCommissioningEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3619,7 +6986,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3634,7 +7001,7 @@ } } -void MTRPowerSourceAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -3657,7 +7024,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPowerSourceAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3672,17 +7039,38 @@ } } -void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType & value) +void MTROperationalCredentialsNOCsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { - MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nonnull objCValue; - objCValue = [MTRGeneralCommissioningClusterBasicCommissioningInfo new]; - objCValue.failSafeExpiryLengthSeconds = [NSNumber numberWithUnsignedShort:value.failSafeExpiryLengthSeconds]; - objCValue.maxCumulativeFailsafeSeconds = [NSNumber numberWithUnsignedShort:value.maxCumulativeFailsafeSeconds]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTROperationalCredentialsClusterNOCStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; + newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; + if (entry_0.icac.IsNull()) { + newElement_0.icac = nil; + } else { + newElement_0.icac = [NSData dataWithBytes:entry_0.icac.Value().data() length:entry_0.icac.Value().size()]; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningBasicCommissioningInfoStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3697,8 +7085,9 @@ } } -void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3706,8 +7095,16 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; + newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; + newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() length:entry_0.rootPublicKey.size()]; + newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; + newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; + newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3720,7 +7117,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3735,8 +7132,8 @@ } } -void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3744,8 +7141,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + NSData * newElement_0; + newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3758,7 +7155,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3773,8 +7170,8 @@ } } -void MTRGeneralCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3796,7 +7193,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3811,9 +7208,8 @@ } } -void MTRNetworkCommissioningNetworksListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3821,10 +7217,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRNetworkCommissioningClusterNetworkInfo * newElement_0; - newElement_0 = [MTRNetworkCommissioningClusterNetworkInfo new]; - newElement_0.networkID = [NSData dataWithBytes:entry_0.networkID.data() length:entry_0.networkID.size()]; - newElement_0.connected = [NSNumber numberWithBool:entry_0.connected]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3837,7 +7231,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningNetworksListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3852,8 +7246,8 @@ } } -void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3875,7 +7269,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3890,8 +7284,8 @@ } } -void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROperationalCredentialsAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3913,7 +7307,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3928,8 +7322,9 @@ } } -void MTRNetworkCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3937,8 +7332,11 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3951,7 +7349,7 @@ DispatchSuccess(context, objCValue); }; -void MTRNetworkCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -3966,8 +7364,9 @@ } } -void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -3975,8 +7374,33 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.endpoints.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + NSNumber * newElement_2; + newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.endpoints = array_2; + } + if (entry_0.groupName.HasValue()) { + newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() + length:entry_0.groupName.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.groupName = nil; + } + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -3989,7 +7413,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4004,7 +7428,7 @@ } } -void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4027,7 +7451,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4042,8 +7466,8 @@ } } -void MTRDiagnosticLogsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4065,7 +7489,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDiagnosticLogsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4080,9 +7504,8 @@ } } -void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRGroupKeyManagementEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4090,59 +7513,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRGeneralDiagnosticsClusterNetworkInterface * newElement_0; - newElement_0 = [MTRGeneralDiagnosticsClusterNetworkInterface new]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.isOperational = [NSNumber numberWithBool:entry_0.isOperational]; - if (entry_0.offPremiseServicesReachableIPv4.IsNull()) { - newElement_0.offPremiseServicesReachableIPv4 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv4 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv4.Value()]; - } - if (entry_0.offPremiseServicesReachableIPv6.IsNull()) { - newElement_0.offPremiseServicesReachableIPv6 = nil; - } else { - newElement_0.offPremiseServicesReachableIPv6 = - [NSNumber numberWithBool:entry_0.offPremiseServicesReachableIPv6.Value()]; - } - newElement_0.hardwareAddress = [NSData dataWithBytes:entry_0.hardwareAddress.data() - length:entry_0.hardwareAddress.size()]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv4Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.iPv4Addresses = array_2; - } - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.IPv6Addresses.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSData * newElement_2; - newElement_2 = [NSData dataWithBytes:entry_2.data() length:entry_2.size()]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.iPv6Addresses = array_2; - } - newElement_0.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.type)]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4155,7 +7527,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsNetworkInterfacesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4170,8 +7542,8 @@ } } -void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4180,7 +7552,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4193,7 +7565,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveHardwareFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4208,8 +7580,8 @@ } } -void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFixedLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4217,8 +7589,14 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + MTRFixedLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRFixedLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4231,7 +7609,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveRadioFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4246,8 +7624,8 @@ } } -void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4256,7 +7634,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4269,7 +7647,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsActiveNetworkFaultsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4284,7 +7662,7 @@ } } -void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4307,7 +7685,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4322,8 +7700,8 @@ } } -void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFixedLabelEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4345,7 +7723,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4360,7 +7738,7 @@ } } -void MTRGeneralDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRFixedLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4383,56 +7761,38 @@ DispatchSuccess(context, objCValue); }; -void MTRGeneralDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; } - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; - } -} - -void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::SoftwareDiagnostics::Structs::ThreadMetricsStruct::DecodableType> & value) -{ - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRSoftwareDiagnosticsClusterThreadMetricsStruct * newElement_0; - newElement_0 = [MTRSoftwareDiagnosticsClusterThreadMetricsStruct new]; - newElement_0.id = [NSNumber numberWithUnsignedLongLong:entry_0.id]; - if (entry_0.name.HasValue()) { - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() - length:entry_0.name.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.name = nil; - } - if (entry_0.stackFreeCurrent.HasValue()) { - newElement_0.stackFreeCurrent = [NSNumber numberWithUnsignedInt:entry_0.stackFreeCurrent.Value()]; - } else { - newElement_0.stackFreeCurrent = nil; - } - if (entry_0.stackFreeMinimum.HasValue()) { - newElement_0.stackFreeMinimum = [NSNumber numberWithUnsignedInt:entry_0.stackFreeMinimum.Value()]; - } else { - newElement_0.stackFreeMinimum = nil; - } - if (entry_0.stackSize.HasValue()) { - newElement_0.stackSize = [NSNumber numberWithUnsignedInt:entry_0.stackSize.Value()]; - } else { - newElement_0.stackSize = nil; - } + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRUserLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRUserLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4445,7 +7805,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsThreadMetricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4460,7 +7820,7 @@ } } -void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4483,7 +7843,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4498,7 +7858,7 @@ } } -void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4521,7 +7881,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4536,8 +7896,8 @@ } } -void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRUserLabelEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4559,7 +7919,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSoftwareDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4574,9 +7934,8 @@ } } -void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::NeighborTable::DecodableType> & value) +void MTRUserLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4584,30 +7943,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRThreadNetworkDiagnosticsClusterNeighborTable * newElement_0; - newElement_0 = [MTRThreadNetworkDiagnosticsClusterNeighborTable new]; - newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; - newElement_0.age = [NSNumber numberWithUnsignedInt:entry_0.age]; - newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; - newElement_0.linkFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.linkFrameCounter]; - newElement_0.mleFrameCounter = [NSNumber numberWithUnsignedInt:entry_0.mleFrameCounter]; - newElement_0.lqi = [NSNumber numberWithUnsignedChar:entry_0.lqi]; - if (entry_0.averageRssi.IsNull()) { - newElement_0.averageRssi = nil; - } else { - newElement_0.averageRssi = [NSNumber numberWithChar:entry_0.averageRssi.Value()]; - } - if (entry_0.lastRssi.IsNull()) { - newElement_0.lastRssi = nil; - } else { - newElement_0.lastRssi = [NSNumber numberWithChar:entry_0.lastRssi.Value()]; - } - newElement_0.frameErrorRate = [NSNumber numberWithUnsignedChar:entry_0.frameErrorRate]; - newElement_0.messageErrorRate = [NSNumber numberWithUnsignedChar:entry_0.messageErrorRate]; - newElement_0.rxOnWhenIdle = [NSNumber numberWithBool:entry_0.rxOnWhenIdle]; - newElement_0.fullThreadDevice = [NSNumber numberWithBool:entry_0.fullThreadDevice]; - newElement_0.fullNetworkData = [NSNumber numberWithBool:entry_0.fullNetworkData]; - newElement_0.isChild = [NSNumber numberWithBool:entry_0.isChild]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4620,7 +7957,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsNeighborTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4635,9 +7972,8 @@ } } -void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRProxyConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4645,18 +7981,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRThreadNetworkDiagnosticsClusterRouteTable * newElement_0; - newElement_0 = [MTRThreadNetworkDiagnosticsClusterRouteTable new]; - newElement_0.extAddress = [NSNumber numberWithUnsignedLongLong:entry_0.extAddress]; - newElement_0.rloc16 = [NSNumber numberWithUnsignedShort:entry_0.rloc16]; - newElement_0.routerId = [NSNumber numberWithUnsignedChar:entry_0.routerId]; - newElement_0.nextHop = [NSNumber numberWithUnsignedChar:entry_0.nextHop]; - newElement_0.pathCost = [NSNumber numberWithUnsignedChar:entry_0.pathCost]; - newElement_0.lqiIn = [NSNumber numberWithUnsignedChar:entry_0.LQIIn]; - newElement_0.lqiOut = [NSNumber numberWithUnsignedChar:entry_0.LQIOut]; - newElement_0.age = [NSNumber numberWithUnsignedChar:entry_0.age]; - newElement_0.allocated = [NSNumber numberWithBool:entry_0.allocated]; - newElement_0.linkEstablished = [NSNumber numberWithBool:entry_0.linkEstablished]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4669,7 +7995,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsRouteTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4684,22 +8010,30 @@ } } -void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & - value) +void MTRProxyConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRThreadNetworkDiagnosticsClusterSecurityPolicy new]; - objCValue.rotationTime = [NSNumber numberWithUnsignedShort:value.Value().rotationTime]; - objCValue.flags = [NSNumber numberWithUnsignedShort:value.Value().flags]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsSecurityPolicyStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4714,32 +8048,30 @@ } } -void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable< - chip::app::Clusters::ThreadNetworkDiagnostics::Structs::OperationalDatasetComponents::DecodableType> & value) +void MTRProxyConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents new]; - objCValue.activeTimestampPresent = [NSNumber numberWithBool:value.Value().activeTimestampPresent]; - objCValue.pendingTimestampPresent = [NSNumber numberWithBool:value.Value().pendingTimestampPresent]; - objCValue.masterKeyPresent = [NSNumber numberWithBool:value.Value().masterKeyPresent]; - objCValue.networkNamePresent = [NSNumber numberWithBool:value.Value().networkNamePresent]; - objCValue.extendedPanIdPresent = [NSNumber numberWithBool:value.Value().extendedPanIdPresent]; - objCValue.meshLocalPrefixPresent = [NSNumber numberWithBool:value.Value().meshLocalPrefixPresent]; - objCValue.delayPresent = [NSNumber numberWithBool:value.Value().delayPresent]; - objCValue.panIdPresent = [NSNumber numberWithBool:value.Value().panIdPresent]; - objCValue.channelPresent = [NSNumber numberWithBool:value.Value().channelPresent]; - objCValue.pskcPresent = [NSNumber numberWithBool:value.Value().pskcPresent]; - objCValue.securityPolicyPresent = [NSNumber numberWithBool:value.Value().securityPolicyPresent]; - objCValue.channelMaskPresent = [NSNumber numberWithBool:value.Value().channelMaskPresent]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsOperationalDatasetComponentsStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4754,8 +8086,8 @@ } } -void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRProxyConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4764,7 +8096,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -4777,7 +8109,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4792,7 +8124,7 @@ } } -void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4815,7 +8147,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyDiscoveryGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4830,7 +8162,7 @@ } } -void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4853,7 +8185,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyDiscoveryAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4868,8 +8200,8 @@ } } -void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRProxyDiscoveryEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4891,7 +8223,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThreadNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyDiscoveryEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4906,8 +8238,8 @@ } } -void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRProxyDiscoveryAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -4929,7 +8261,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyDiscoveryAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4944,7 +8276,7 @@ } } -void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRProxyValidGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -4967,7 +8299,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyValidGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -4982,8 +8314,8 @@ } } -void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRProxyValidAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5005,7 +8337,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWiFiNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyValidAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5020,8 +8352,8 @@ } } -void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRProxyValidEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5043,7 +8375,7 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyValidEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5058,8 +8390,8 @@ } } -void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRProxyValidAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5081,7 +8413,7 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRProxyValidAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5096,8 +8428,8 @@ } } -void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5119,7 +8451,7 @@ DispatchSuccess(context, objCValue); }; -void MTREthernetNetworkDiagnosticsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5134,21 +8466,30 @@ } } -void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::Clusters::BridgedDeviceBasicInformation::Structs::ProductAppearanceStruct::DecodableType & value) +void MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nonnull objCValue; - objCValue = [MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct new]; - objCValue.finish = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.finish)]; - if (value.primaryColor.IsNull()) { - objCValue.primaryColor = nil; - } else { - objCValue.primaryColor = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.primaryColor.Value())]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationProductAppearanceStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5163,8 +8504,8 @@ } } -void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBooleanStateEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5186,7 +8527,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBooleanStateEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5201,8 +8542,8 @@ } } -void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBooleanStateAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5224,7 +8565,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5239,8 +8580,8 @@ } } -void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRModeSelectSupportedModesListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5248,8 +8589,30 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRModeSelectClusterModeOptionStruct * newElement_0; + newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.semanticTags.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRModeSelectClusterSemanticTagStruct * newElement_2; + newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; + newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; + newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + newElement_0.semanticTags = array_2; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5262,7 +8625,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBridgedDeviceBasicInformationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5277,7 +8640,7 @@ } } -void MTRSwitchGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5300,7 +8663,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5315,7 +8678,7 @@ } } -void MTRSwitchAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5338,7 +8701,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5353,8 +8716,8 @@ } } -void MTRSwitchAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRModeSelectEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5376,7 +8739,7 @@ DispatchSuccess(context, objCValue); }; -void MTRSwitchAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5391,8 +8754,8 @@ } } -void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRModeSelectAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5414,7 +8777,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5429,30 +8792,15 @@ } } -void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5467,30 +8815,15 @@ } } -void MTRAdministratorCommissioningAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRAdministratorCommissioningAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5505,38 +8838,15 @@ } } -void MTROperationalCredentialsNOCsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterNOCStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterNOCStruct new]; - newElement_0.noc = [NSData dataWithBytes:entry_0.noc.data() length:entry_0.noc.size()]; - if (entry_0.icac.IsNull()) { - newElement_0.icac = nil; - } else { - newElement_0.icac = [NSData dataWithBytes:entry_0.icac.Value().data() length:entry_0.icac.Value().size()]; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsNOCsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5551,39 +8861,15 @@ } } -void MTROperationalCredentialsFabricsListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> & value) +void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTROperationalCredentialsClusterFabricDescriptorStruct * newElement_0; - newElement_0 = [MTROperationalCredentialsClusterFabricDescriptorStruct new]; - newElement_0.rootPublicKey = [NSData dataWithBytes:entry_0.rootPublicKey.data() length:entry_0.rootPublicKey.size()]; - newElement_0.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0.vendorID)]; - newElement_0.fabricID = [NSNumber numberWithUnsignedLongLong:entry_0.fabricID]; - newElement_0.nodeID = [NSNumber numberWithUnsignedLongLong:entry_0.nodeID]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsFabricsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5598,8 +8884,8 @@ } } -void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5607,8 +8893,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSData * newElement_0; - newElement_0 = [NSData dataWithBytes:entry_0.data() length:entry_0.size()]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5621,7 +8907,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsTrustedRootCertificatesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5636,7 +8922,7 @@ } } -void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5659,7 +8945,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5674,8 +8960,8 @@ } } -void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRDoorLockEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5697,7 +8983,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5712,7 +8998,7 @@ } } -void MTROperationalCredentialsAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRDoorLockAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5735,7 +9021,7 @@ DispatchSuccess(context, objCValue); }; -void MTROperationalCredentialsAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5750,34 +9036,84 @@ } } -void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; } +} + +void MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGroupKeyMapListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRWindowCoveringModeAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5792,9 +9128,8 @@ } } -void MTRGroupKeyManagementGroupTableListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5802,33 +9137,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRGroupKeyManagementClusterGroupInfoMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupInfoMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.endpoints.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - NSNumber * newElement_2; - newElement_2 = [NSNumber numberWithUnsignedShort:entry_2]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.endpoints = array_2; - } - if (entry_0.groupName.HasValue()) { - newElement_0.groupName = [[NSString alloc] initWithBytes:entry_0.groupName.Value().data() - length:entry_0.groupName.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.groupName = nil; - } - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5841,7 +9151,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGroupTableListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5856,7 +9166,7 @@ } } -void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5879,7 +9189,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5894,8 +9204,8 @@ } } -void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWindowCoveringEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5917,7 +9227,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5932,7 +9242,7 @@ } } -void MTRGroupKeyManagementAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -5955,7 +9265,7 @@ DispatchSuccess(context, objCValue); }; -void MTRGroupKeyManagementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -5970,8 +9280,8 @@ } } -void MTRFixedLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -5979,14 +9289,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRFixedLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRFixedLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -5999,7 +9303,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6014,7 +9318,7 @@ } } -void MTRFixedLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6037,7 +9341,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6052,8 +9356,8 @@ } } -void MTRFixedLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBarrierControlEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6075,7 +9379,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBarrierControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6090,7 +9394,7 @@ } } -void MTRFixedLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRBarrierControlAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6113,7 +9417,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFixedLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6128,8 +9432,31 @@ } } -void MTRUserLabelLabelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6137,14 +9464,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRUserLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6157,7 +9478,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelLabelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6172,7 +9493,7 @@ } } -void MTRUserLabelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6195,7 +9516,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6210,8 +9531,8 @@ } } -void MTRUserLabelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPumpConfigurationAndControlEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6233,7 +9554,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6248,7 +9569,7 @@ } } -void MTRUserLabelAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6271,7 +9592,7 @@ DispatchSuccess(context, objCValue); }; -void MTRUserLabelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6286,7 +9607,7 @@ } } -void MTRBooleanStateGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6309,7 +9630,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6324,7 +9645,7 @@ } } -void MTRBooleanStateAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6347,7 +9668,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6362,8 +9683,8 @@ } } -void MTRBooleanStateAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThermostatEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6385,7 +9706,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBooleanStateAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6400,8 +9721,8 @@ } } -void MTRModeSelectSupportedModesListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRThermostatAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6409,30 +9730,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRModeSelectClusterModeOptionStruct * newElement_0; - newElement_0 = [MTRModeSelectClusterModeOptionStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.mode = [NSNumber numberWithUnsignedChar:entry_0.mode]; - { // Scope for our temporary variables - auto * array_2 = [NSMutableArray new]; - auto iter_2 = entry_0.semanticTags.begin(); - while (iter_2.Next()) { - auto & entry_2 = iter_2.GetValue(); - MTRModeSelectClusterSemanticTagStruct * newElement_2; - newElement_2 = [MTRModeSelectClusterSemanticTagStruct new]; - newElement_2.mfgCode = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_2.mfgCode)]; - newElement_2.value = [NSNumber numberWithUnsignedShort:entry_2.value]; - [array_2 addObject:newElement_2]; - } - CHIP_ERROR err = iter_2.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - newElement_0.semanticTags = array_2; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -6445,7 +9744,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectSupportedModesListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6460,7 +9759,7 @@ } } -void MTRModeSelectGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6483,7 +9782,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6498,7 +9797,7 @@ } } -void MTRModeSelectAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6521,7 +9820,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6536,8 +9835,8 @@ } } -void MTRModeSelectAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFanControlEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6559,7 +9858,7 @@ DispatchSuccess(context, objCValue); }; -void MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6574,15 +9873,30 @@ } } -void MTRDoorLockCredentialRulesSupportAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRFanControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRDoorLockCredentialRulesSupportAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6597,15 +9911,30 @@ } } -void MTRDoorLockSupportedOperatingModesAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRDoorLockSupportedOperatingModesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6620,38 +9949,30 @@ } } -void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTRDoorLockDefaultConfigurationRegisterAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } -} - -void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRDoorLockLocalProgrammingFeaturesAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6666,8 +9987,8 @@ } } -void MTRDoorLockGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6689,7 +10010,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6704,8 +10025,8 @@ } } -void MTRDoorLockAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6727,7 +10048,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6742,8 +10063,8 @@ } } -void MTRDoorLockAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6765,7 +10086,7 @@ DispatchSuccess(context, objCValue); }; -void MTRDoorLockAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6780,15 +10101,30 @@ } } -void MTRWindowCoveringConfigStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringConfigStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6803,15 +10139,30 @@ } } -void MTRWindowCoveringOperationalStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRColorControlEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringOperationalStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6826,15 +10177,30 @@ } } -void MTRWindowCoveringModeAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRColorControlAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringModeAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6849,15 +10215,30 @@ } } -void MTRWindowCoveringSafetyStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringSafetyStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6872,7 +10253,7 @@ } } -void MTRWindowCoveringGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6895,7 +10276,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6910,8 +10291,8 @@ } } -void MTRWindowCoveringAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRBallastConfigurationEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -6933,7 +10314,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBallastConfigurationEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6948,7 +10329,7 @@ } } -void MTRWindowCoveringAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRBallastConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -6971,7 +10352,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWindowCoveringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -6986,7 +10367,7 @@ } } -void MTRBarrierControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7009,7 +10390,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7024,7 +10405,7 @@ } } -void MTRBarrierControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7047,7 +10428,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7062,8 +10443,8 @@ } } -void MTRBarrierControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRIlluminanceMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7085,7 +10466,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBarrierControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7100,15 +10481,30 @@ } } -void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) +void MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlPumpStatusAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7123,7 +10519,7 @@ } } -void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7146,7 +10542,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7161,7 +10557,7 @@ } } -void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7184,7 +10580,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7199,8 +10595,8 @@ } } -void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTemperatureMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7222,7 +10618,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPumpConfigurationAndControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7237,8 +10633,8 @@ } } -void MTRThermostatGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7260,7 +10656,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7275,7 +10671,7 @@ } } -void MTRThermostatAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7298,7 +10694,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7313,8 +10709,8 @@ } } -void MTRThermostatAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7336,7 +10732,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7351,8 +10747,8 @@ } } -void MTRFanControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPressureMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7374,7 +10770,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7389,8 +10785,8 @@ } } -void MTRFanControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7412,7 +10808,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7427,8 +10823,8 @@ } } -void MTRFanControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7450,7 +10846,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFanControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7465,7 +10861,7 @@ } } -void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7488,7 +10884,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7503,8 +10899,8 @@ } } -void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRFlowMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7526,7 +10922,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFlowMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7541,7 +10937,7 @@ } } -void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7564,7 +10960,7 @@ DispatchSuccess(context, objCValue); }; -void MTRThermostatUserInterfaceConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7579,7 +10975,7 @@ } } -void MTRColorControlGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7602,7 +10998,7 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7617,7 +11013,7 @@ } } -void MTRColorControlAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7640,7 +11036,7 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7655,8 +11051,8 @@ } } -void MTRColorControlAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRRelativeHumidityMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7678,7 +11074,7 @@ DispatchSuccess(context, objCValue); }; -void MTRColorControlAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRelativeHumidityMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7693,8 +11089,8 @@ } } -void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7716,7 +11112,30 @@ DispatchSuccess(context, objCValue); }; -void MTRBallastConfigurationGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTROccupancySensingOccupancyAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7731,30 +11150,15 @@ } } -void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitMask value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; - } - objCValue = array_0; - } + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTRBallastConfigurationAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7769,8 +11173,8 @@ } } -void MTRBallastConfigurationAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7792,7 +11196,7 @@ DispatchSuccess(context, objCValue); }; -void MTRBallastConfigurationAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7807,7 +11211,7 @@ } } -void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7830,7 +11234,7 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7845,8 +11249,8 @@ } } -void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTROccupancySensingEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -7868,7 +11272,7 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7883,7 +11287,7 @@ } } -void MTRIlluminanceMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTROccupancySensingAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7906,7 +11310,7 @@ DispatchSuccess(context, objCValue); }; -void MTRIlluminanceMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7921,7 +11325,7 @@ } } -void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7944,7 +11348,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7959,7 +11363,7 @@ } } -void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -7982,7 +11386,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -7997,8 +11401,8 @@ } } -void MTRTemperatureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWakeOnLANEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8020,7 +11424,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWakeOnLANEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8035,8 +11439,8 @@ } } -void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRWakeOnLANAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8058,7 +11462,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8073,8 +11477,8 @@ } } -void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8082,8 +11486,31 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRChannelClusterChannelInfoStruct * newElement_0; + newElement_0 = [MTRChannelClusterChannelInfoStruct new]; + newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; + newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + if (entry_0.callSign.HasValue()) { + newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.Value().data() + length:entry_0.callSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.callSign = nil; + } + if (entry_0.affiliateCallSign.HasValue()) { + newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.Value().data() + length:entry_0.affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.affiliateCallSign = nil; + } [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8096,7 +11523,7 @@ DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8111,30 +11538,37 @@ } } -void MTRPressureMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelLineupStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; + MTRChannelClusterLineupInfoStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRChannelClusterLineupInfoStruct new]; + objCValue.operatorName = [[NSString alloc] initWithBytes:value.Value().operatorName.data() + length:value.Value().operatorName.size() + encoding:NSUTF8StringEncoding]; + if (value.Value().lineupName.HasValue()) { + objCValue.lineupName = [[NSString alloc] initWithBytes:value.Value().lineupName.Value().data() + length:value.Value().lineupName.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.lineupName = nil; } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; + if (value.Value().postalCode.HasValue()) { + objCValue.postalCode = [[NSString alloc] initWithBytes:value.Value().postalCode.Value().data() + length:value.Value().postalCode.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.postalCode = nil; } - objCValue = array_0; + objCValue.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().lineupInfoType)]; } DispatchSuccess(context, objCValue); }; -void MTRPressureMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8149,30 +11583,42 @@ } } -void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelCurrentChannelStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; + MTRChannelClusterChannelInfoStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRChannelClusterChannelInfoStruct new]; + objCValue.majorNumber = [NSNumber numberWithUnsignedShort:value.Value().majorNumber]; + objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.Value().minorNumber]; + if (value.Value().name.HasValue()) { + objCValue.name = [[NSString alloc] initWithBytes:value.Value().name.Value().data() + length:value.Value().name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.name = nil; } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; + if (value.Value().callSign.HasValue()) { + objCValue.callSign = [[NSString alloc] initWithBytes:value.Value().callSign.Value().data() + length:value.Value().callSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.callSign = nil; + } + if (value.Value().affiliateCallSign.HasValue()) { + objCValue.affiliateCallSign = [[NSString alloc] initWithBytes:value.Value().affiliateCallSign.Value().data() + length:value.Value().affiliateCallSign.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + objCValue.affiliateCallSign = nil; } - objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8187,7 +11633,7 @@ } } -void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRChannelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8210,7 +11656,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8225,8 +11671,8 @@ } } -void MTRFlowMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8248,7 +11694,7 @@ DispatchSuccess(context, objCValue); }; -void MTRFlowMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8263,8 +11709,8 @@ } } -void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8286,7 +11732,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8301,8 +11747,8 @@ } } -void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRChannelAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8324,7 +11770,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8339,8 +11785,9 @@ } } -void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & + value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8348,8 +11795,12 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; + newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; + newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8362,7 +11813,7 @@ DispatchSuccess(context, objCValue); }; -void MTRRelativeHumidityMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8377,38 +11828,30 @@ } } -void MTROccupancySensingOccupancyAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; - DispatchSuccess(context, objCValue); -}; - -void MTROccupancySensingOccupancyAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - if (!mQueue) { - return; - } - - if (mEstablishedHandler != nil) { - dispatch_async(mQueue, mEstablishedHandler); - // On failure, mEstablishedHandler will be cleaned up by our destructor, - // but we can clean it up earlier on successful subscription - // establishment. - mEstablishedHandler = nil; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; } -} - -void MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackBridge::OnSuccessFn( - void * context, chip::BitMask value) -{ - NSNumber * _Nonnull objCValue; - objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; DispatchSuccess(context, objCValue); }; -void MTROccupancySensingOccupancySensorTypeBitmapAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8423,7 +11866,7 @@ } } -void MTROccupancySensingGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8446,7 +11889,7 @@ DispatchSuccess(context, objCValue); }; -void MTROccupancySensingGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8461,8 +11904,8 @@ } } -void MTROccupancySensingAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRTargetNavigatorEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8484,7 +11927,7 @@ DispatchSuccess(context, objCValue); }; -void MTROccupancySensingAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8499,7 +11942,7 @@ } } -void MTROccupancySensingAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRTargetNavigatorAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8522,7 +11965,7 @@ DispatchSuccess(context, objCValue); }; -void MTROccupancySensingAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8537,7 +11980,41 @@ } } -void MTRWakeOnLANGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & + value) +{ + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; + objCValue.updatedAt = [NSNumber numberWithUnsignedLongLong:value.Value().updatedAt]; + if (value.Value().position.IsNull()) { + objCValue.position = nil; + } else { + objCValue.position = [NSNumber numberWithUnsignedLongLong:value.Value().position.Value()]; + } + } + DispatchSuccess(context, objCValue); +}; + +void MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8560,7 +12037,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLANGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8575,7 +12052,7 @@ } } -void MTRWakeOnLANAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8598,7 +12075,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLANAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8613,8 +12090,8 @@ } } -void MTRWakeOnLANAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRMediaPlaybackEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8636,7 +12113,7 @@ DispatchSuccess(context, objCValue); }; -void MTRWakeOnLANAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8651,8 +12128,8 @@ } } -void MTRChannelChannelListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRMediaPlaybackAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8660,31 +12137,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRChannelClusterChannelInfoStruct * newElement_0; - newElement_0 = [MTRChannelClusterChannelInfoStruct new]; - newElement_0.majorNumber = [NSNumber numberWithUnsignedShort:entry_0.majorNumber]; - newElement_0.minorNumber = [NSNumber numberWithUnsignedShort:entry_0.minorNumber]; - if (entry_0.name.HasValue()) { - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() - length:entry_0.name.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.name = nil; - } - if (entry_0.callSign.HasValue()) { - newElement_0.callSign = [[NSString alloc] initWithBytes:entry_0.callSign.Value().data() - length:entry_0.callSign.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.callSign = nil; - } - if (entry_0.affiliateCallSign.HasValue()) { - newElement_0.affiliateCallSign = [[NSString alloc] initWithBytes:entry_0.affiliateCallSign.Value().data() - length:entry_0.affiliateCallSign.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - newElement_0.affiliateCallSign = nil; - } + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8697,7 +12151,7 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelChannelListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8712,37 +12166,38 @@ } } -void MTRChannelLineupStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRMediaInputInputListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { - MTRChannelClusterLineupInfoStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRChannelClusterLineupInfoStruct new]; - objCValue.operatorName = [[NSString alloc] initWithBytes:value.Value().operatorName.data() - length:value.Value().operatorName.size() - encoding:NSUTF8StringEncoding]; - if (value.Value().lineupName.HasValue()) { - objCValue.lineupName = [[NSString alloc] initWithBytes:value.Value().lineupName.Value().data() - length:value.Value().lineupName.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - objCValue.lineupName = nil; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRMediaInputClusterInputInfoStruct * newElement_0; + newElement_0 = [MTRMediaInputClusterInputInfoStruct new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; + newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() + length:entry_0.description.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; } - if (value.Value().postalCode.HasValue()) { - objCValue.postalCode = [[NSString alloc] initWithBytes:value.Value().postalCode.Value().data() - length:value.Value().postalCode.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - objCValue.postalCode = nil; + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } - objCValue.lineupInfoType = [NSNumber numberWithUnsignedChar:chip::to_underlying(value.Value().lineupInfoType)]; + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRChannelLineupStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8757,42 +12212,30 @@ } } -void MTRChannelCurrentChannelStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & value) +void MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRChannelClusterChannelInfoStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRChannelClusterChannelInfoStruct new]; - objCValue.majorNumber = [NSNumber numberWithUnsignedShort:value.Value().majorNumber]; - objCValue.minorNumber = [NSNumber numberWithUnsignedShort:value.Value().minorNumber]; - if (value.Value().name.HasValue()) { - objCValue.name = [[NSString alloc] initWithBytes:value.Value().name.Value().data() - length:value.Value().name.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - objCValue.name = nil; - } - if (value.Value().callSign.HasValue()) { - objCValue.callSign = [[NSString alloc] initWithBytes:value.Value().callSign.Value().data() - length:value.Value().callSign.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - objCValue.callSign = nil; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; } - if (value.Value().affiliateCallSign.HasValue()) { - objCValue.affiliateCallSign = [[NSString alloc] initWithBytes:value.Value().affiliateCallSign.Value().data() - length:value.Value().affiliateCallSign.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - objCValue.affiliateCallSign = nil; + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRChannelCurrentChannelStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8807,7 +12250,7 @@ } } -void MTRChannelGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8830,7 +12273,7 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8845,8 +12288,8 @@ } } -void MTRChannelAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRMediaInputEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8868,7 +12311,7 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8883,7 +12326,7 @@ } } -void MTRChannelAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRMediaInputAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8906,7 +12349,7 @@ DispatchSuccess(context, objCValue); }; -void MTRChannelAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8921,9 +12364,8 @@ } } -void MTRTargetNavigatorTargetListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & - value) +void MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -8931,12 +12373,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRTargetNavigatorClusterTargetInfoStruct * newElement_0; - newElement_0 = [MTRTargetNavigatorClusterTargetInfoStruct new]; - newElement_0.identifier = [NSNumber numberWithUnsignedChar:entry_0.identifier]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -8949,7 +12387,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorTargetListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -8964,7 +12402,7 @@ } } -void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -8987,7 +12425,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9002,8 +12440,8 @@ } } -void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRLowPowerEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9025,7 +12463,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9040,7 +12478,7 @@ } } -void MTRTargetNavigatorAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRLowPowerAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9063,7 +12501,7 @@ DispatchSuccess(context, objCValue); }; -void MTRTargetNavigatorAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9078,26 +12516,30 @@ } } -void MTRMediaPlaybackSampledPositionStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & - value) +void MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRMediaPlaybackClusterPlaybackPositionStruct new]; - objCValue.updatedAt = [NSNumber numberWithUnsignedLongLong:value.Value().updatedAt]; - if (value.Value().position.IsNull()) { - objCValue.position = nil; - } else { - objCValue.position = [NSNumber numberWithUnsignedLongLong:value.Value().position.Value()]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackSampledPositionStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9112,7 +12554,7 @@ } } -void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9135,7 +12577,7 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9150,8 +12592,8 @@ } } -void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRKeypadInputEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9173,7 +12615,7 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRKeypadInputEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9188,7 +12630,7 @@ } } -void MTRMediaPlaybackAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRKeypadInputAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9211,7 +12653,7 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaPlaybackAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9226,8 +12668,8 @@ } } -void MTRMediaInputInputListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9235,16 +12677,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRMediaInputClusterInputInfoStruct * newElement_0; - newElement_0 = [MTRMediaInputClusterInputInfoStruct new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.inputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.inputType)]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; - newElement_0.descriptionString = [[NSString alloc] initWithBytes:entry_0.description.data() - length:entry_0.description.size() - encoding:NSUTF8StringEncoding]; + NSString * newElement_0; + newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9257,7 +12691,7 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputInputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9272,7 +12706,7 @@ } } -void MTRMediaInputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9295,7 +12729,7 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9310,7 +12744,7 @@ } } -void MTRMediaInputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9333,7 +12767,7 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9348,8 +12782,8 @@ } } -void MTRMediaInputAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRContentLauncherEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9371,7 +12805,7 @@ DispatchSuccess(context, objCValue); }; -void MTRMediaInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9386,8 +12820,8 @@ } } -void MTRLowPowerGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRContentLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9409,7 +12843,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLowPowerGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9424,8 +12858,8 @@ } } -void MTRLowPowerAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAudioOutputOutputListListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9433,8 +12867,13 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRAudioOutputClusterOutputInfoStruct * newElement_0; + newElement_0 = [MTRAudioOutputClusterOutputInfoStruct new]; + newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; + newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() + length:entry_0.name.size() + encoding:NSUTF8StringEncoding]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9447,7 +12886,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLowPowerAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9462,8 +12901,8 @@ } } -void MTRLowPowerAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9485,7 +12924,7 @@ DispatchSuccess(context, objCValue); }; -void MTRLowPowerAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9500,7 +12939,7 @@ } } -void MTRKeypadInputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9523,7 +12962,7 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9538,8 +12977,8 @@ } } -void MTRKeypadInputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAudioOutputEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9561,7 +13000,7 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9576,7 +13015,7 @@ } } -void MTRKeypadInputAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRAudioOutputAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9599,7 +13038,7 @@ DispatchSuccess(context, objCValue); }; -void MTRKeypadInputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9614,8 +13053,8 @@ } } -void MTRContentLauncherAcceptHeaderListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherCatalogListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9623,8 +13062,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSString * newElement_0; - newElement_0 = [[NSString alloc] initWithBytes:entry_0.data() length:entry_0.size() encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9637,7 +13076,7 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherAcceptHeaderListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9652,30 +13091,30 @@ } } -void MTRContentLauncherGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::Nullable & + value) { - NSArray * _Nonnull objCValue; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = value.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - OnFailureFn(context, err); - return; + MTRApplicationLauncherClusterApplicationEPStruct * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [MTRApplicationLauncherClusterApplicationEPStruct new]; + objCValue.application = [MTRApplicationLauncherClusterApplicationStruct new]; + objCValue.application.catalogVendorID = [NSNumber numberWithUnsignedShort:value.Value().application.catalogVendorID]; + objCValue.application.applicationID = [[NSString alloc] initWithBytes:value.Value().application.applicationID.data() + length:value.Value().application.applicationID.size() + encoding:NSUTF8StringEncoding]; + if (value.Value().endpoint.HasValue()) { + objCValue.endpoint = [NSNumber numberWithUnsignedShort:value.Value().endpoint.Value()]; + } else { + objCValue.endpoint = nil; } - objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRContentLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9690,7 +13129,7 @@ } } -void MTRContentLauncherAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -9713,7 +13152,7 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9728,8 +13167,8 @@ } } -void MTRContentLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9751,7 +13190,7 @@ DispatchSuccess(context, objCValue); }; -void MTRContentLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9766,8 +13205,8 @@ } } -void MTRAudioOutputOutputListListAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9775,13 +13214,8 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - MTRAudioOutputClusterOutputInfoStruct * newElement_0; - newElement_0 = [MTRAudioOutputClusterOutputInfoStruct new]; - newElement_0.index = [NSNumber numberWithUnsignedChar:entry_0.index]; - newElement_0.outputType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.outputType)]; - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.data() - length:entry_0.name.size() - encoding:NSUTF8StringEncoding]; + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9794,7 +13228,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputOutputListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9809,8 +13243,8 @@ } } -void MTRAudioOutputGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9832,7 +13266,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9847,8 +13281,35 @@ } } -void MTRAudioOutputAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value) +{ + MTRApplicationBasicClusterApplicationStruct * _Nonnull objCValue; + objCValue = [MTRApplicationBasicClusterApplicationStruct new]; + objCValue.catalogVendorID = [NSNumber numberWithUnsignedShort:value.catalogVendorID]; + objCValue.applicationID = [[NSString alloc] initWithBytes:value.applicationID.data() + length:value.applicationID.size() + encoding:NSUTF8StringEncoding]; + DispatchSuccess(context, objCValue); +}; + +void MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9857,7 +13318,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0)]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9870,7 +13331,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9885,8 +13346,8 @@ } } -void MTRAudioOutputAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9908,7 +13369,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAudioOutputAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9923,8 +13384,8 @@ } } -void MTRApplicationLauncherCatalogListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -9933,7 +13394,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -9946,7 +13407,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherCatalogListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9961,30 +13422,30 @@ } } -void MTRApplicationLauncherCurrentAppStructAttributeCallbackBridge::OnSuccessFn(void * context, - const chip::app::DataModel::Nullable & - value) +void MTRApplicationBasicEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRApplicationLauncherClusterApplicationEPStruct * _Nullable objCValue; - if (value.IsNull()) { - objCValue = nil; - } else { - objCValue = [MTRApplicationLauncherClusterApplicationEPStruct new]; - objCValue.application = [MTRApplicationLauncherClusterApplicationStruct new]; - objCValue.application.catalogVendorID = [NSNumber numberWithUnsignedShort:value.Value().application.catalogVendorID]; - objCValue.application.applicationID = [[NSString alloc] initWithBytes:value.Value().application.applicationID.data() - length:value.Value().application.applicationID.size() - encoding:NSUTF8StringEncoding]; - if (value.Value().endpoint.HasValue()) { - objCValue.endpoint = [NSNumber numberWithUnsignedShort:value.Value().endpoint.Value()]; - } else { - objCValue.endpoint = nil; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; } + objCValue = array_0; } DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherCurrentAppStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -9999,8 +13460,8 @@ } } -void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRApplicationBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10022,7 +13483,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10037,7 +13498,7 @@ } } -void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10060,7 +13521,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10075,8 +13536,8 @@ } } -void MTRApplicationLauncherAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10098,7 +13559,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationLauncherAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10113,19 +13574,30 @@ } } -void MTRApplicationBasicApplicationStructAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::Clusters::ApplicationBasic::Structs::ApplicationStruct::DecodableType & value) +void MTRAccountLoginEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { - MTRApplicationBasicClusterApplicationStruct * _Nonnull objCValue; - objCValue = [MTRApplicationBasicClusterApplicationStruct new]; - objCValue.catalogVendorID = [NSNumber numberWithUnsignedShort:value.catalogVendorID]; - objCValue.applicationID = [[NSString alloc] initWithBytes:value.applicationID.data() - length:value.applicationID.size() - encoding:NSUTF8StringEncoding]; + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicApplicationStructAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccountLoginEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10140,8 +13612,8 @@ } } -void MTRApplicationBasicAllowedVendorListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRAccountLoginAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10150,7 +13622,7 @@ while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:chip::to_underlying(entry_0)]; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10163,7 +13635,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicAllowedVendorListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10178,7 +13650,7 @@ } } -void MTRApplicationBasicGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10201,7 +13673,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10216,7 +13688,7 @@ } } -void MTRApplicationBasicAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10239,7 +13711,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10254,8 +13726,8 @@ } } -void MTRApplicationBasicAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRElectricalMeasurementEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10277,7 +13749,7 @@ DispatchSuccess(context, objCValue); }; -void MTRApplicationBasicAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRElectricalMeasurementEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10292,8 +13764,8 @@ } } -void MTRAccountLoginGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10315,7 +13787,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccountLoginGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10330,8 +13802,9 @@ } } -void MTRAccountLoginAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRClientMonitoringExpectedClientsListAttributeCallbackBridge::OnSuccessFn(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ClientMonitoring::Structs::MonitoringRegistration::DecodableType> & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10339,8 +13812,11 @@ auto iter_0 = value.begin(); while (iter_0.Next()) { auto & entry_0 = iter_0.GetValue(); - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + MTRClientMonitoringClusterMonitoringRegistration * newElement_0; + newElement_0 = [MTRClientMonitoringClusterMonitoringRegistration new]; + newElement_0.clientNodeId = [NSNumber numberWithUnsignedLongLong:entry_0.clientNodeId]; + newElement_0.iCid = [NSNumber numberWithUnsignedLongLong:entry_0.ICid]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; [array_0 addObject:newElement_0]; } CHIP_ERROR err = iter_0.GetStatus(); @@ -10353,7 +13829,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccountLoginAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRClientMonitoringExpectedClientsListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10368,8 +13844,8 @@ } } -void MTRAccountLoginAttributeListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRClientMonitoringGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10391,7 +13867,7 @@ DispatchSuccess(context, objCValue); }; -void MTRAccountLoginAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRClientMonitoringGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10406,7 +13882,7 @@ } } -void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( +void MTRClientMonitoringAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10429,7 +13905,7 @@ DispatchSuccess(context, objCValue); }; -void MTRElectricalMeasurementGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRClientMonitoringAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10444,8 +13920,8 @@ } } -void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( - void * context, const chip::app::DataModel::DecodableList & value) +void MTRClientMonitoringEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; { // Scope for our temporary variables @@ -10467,7 +13943,7 @@ DispatchSuccess(context, objCValue); }; -void MTRElectricalMeasurementAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRClientMonitoringEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -10482,7 +13958,7 @@ } } -void MTRElectricalMeasurementAttributeListListAttributeCallbackBridge::OnSuccessFn( +void MTRClientMonitoringAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { NSArray * _Nonnull objCValue; @@ -10505,7 +13981,7 @@ DispatchSuccess(context, objCValue); }; -void MTRElectricalMeasurementAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +void MTRClientMonitoringAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() { if (!mQueue) { return; @@ -11324,6 +14800,44 @@ } } +void MTRUnitTestingEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRUnitTestingEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRUnitTestingAttributeListListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -11362,6 +14876,158 @@ } } +void MTRFaultInjectionGeneratedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionGeneratedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRFaultInjectionAcceptedCommandListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionAcceptedCommandListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRFaultInjectionEventListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionEventListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + +void MTRFaultInjectionAttributeListListAttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::DecodableList & value) +{ + NSArray * _Nonnull objCValue; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = value.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedInt:entry_0]; + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + OnFailureFn(context, err); + return; + } + objCValue = array_0; + } + DispatchSuccess(context, objCValue); +}; + +void MTRFaultInjectionAttributeListListAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished() +{ + if (!mQueue) { + return; + } + + if (mEstablishedHandler != nil) { + dispatch_async(mQueue, mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + mEstablishedHandler = nil; + } +} + void MTRGroupsClusterAddGroupResponseCallbackBridge::OnSuccessFn( void * context, const chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType & data) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 5d5fbcead09a84..c6c68e4ed750fc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -305,6 +305,7 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeApplicationBasicID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050D, MTRClusterIDTypeAccountLoginID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000050E, MTRClusterIDTypeElectricalMeasurementID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000B04, + MTRClusterIDTypeClientMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00001046, MTRClusterIDTypeUnitTestingID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0xFFF1FC05, MTRClusterIDTypeFaultInjectionID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0xFFF1FC06, }; @@ -336,6 +337,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = 0x0000FFF8, MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFF9, + MTRAttributeIDTypeGlobalAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = 0x0000FFFA, MTRAttributeIDTypeGlobalAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFB, MTRAttributeIDTypeGlobalAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFC, MTRAttributeIDTypeGlobalAttributeClusterRevisionID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000FFFD, @@ -376,6 +378,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterIdentifyAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterIdentifyAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterIdentifyAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterIdentifyAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -413,6 +417,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterGroupsAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterGroupsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGroupsAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterGroupsAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -476,6 +481,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterScenesAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterScenesAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterScenesAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -531,6 +537,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterOnOffAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOnOffAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOnOffAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterOnOffAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -581,6 +588,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -703,6 +712,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLevelControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLevelControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLevelControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLevelControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -794,6 +805,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBinaryInputBasicAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBinaryInputBasicAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -832,6 +845,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -895,6 +910,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDescriptorAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDescriptorAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDescriptorAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDescriptorAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -931,6 +948,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterBindingAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBindingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBindingAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBindingAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -999,6 +1017,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAccessControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterAccessControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAccessControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAccessControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1046,6 +1066,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterActionsAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterActionsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterActionsAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterActionsAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1201,6 +1222,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBasicInformationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBasicInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBasicInformationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1239,6 +1262,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1306,6 +1331,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1359,6 +1386,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLocalizationConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1419,6 +1448,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1465,6 +1496,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitLocalizationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUnitLocalizationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1510,6 +1543,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1748,6 +1783,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPowerSourceAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterPowerSourceAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPowerSourceAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterPowerSourceAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -1819,6 +1856,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGeneralCommissioningAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGeneralCommissioningAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1913,6 +1952,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterNetworkCommissioningAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterNetworkCommissioningAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -1952,6 +1993,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterDiagnosticLogsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDiagnosticLogsAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -2050,6 +2093,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2116,6 +2161,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2596,6 +2643,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2724,6 +2773,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2826,6 +2877,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -2935,6 +2988,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3080,6 +3135,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3132,6 +3189,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterSwitchAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterSwitchAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterSwitchAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterSwitchAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3189,6 +3247,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAdministratorCommissioningAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3269,6 +3329,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOperationalCredentialsAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOperationalCredentialsAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3335,6 +3397,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGroupKeyManagementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterGroupKeyManagementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3377,6 +3441,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFixedLabelAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterFixedLabelAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFixedLabelAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFixedLabelAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3416,6 +3482,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterUserLabelAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterUserLabelAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUserLabelAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUserLabelAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3452,6 +3520,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterProxyConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterProxyConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterProxyConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -3490,6 +3560,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterProxyDiscoveryAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterProxyDiscoveryAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterProxyDiscoveryAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterProxyDiscoveryAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3526,6 +3598,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterProxyValidAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterProxyValidAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterProxyValidAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterProxyValidAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3568,6 +3642,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBooleanStateAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBooleanStateAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBooleanStateAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBooleanStateAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3638,6 +3714,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterModeSelectAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterModeSelectAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterModeSelectAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -3897,6 +3975,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterDoorLockAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterDoorLockAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterDoorLockAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterDoorLockAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4080,6 +4160,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterWindowCoveringAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWindowCoveringAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWindowCoveringAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4187,6 +4269,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBarrierControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBarrierControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBarrierControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterBarrierControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4385,6 +4469,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -4741,6 +4827,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterThermostatAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThermostatAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterThermostatAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4840,6 +4928,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFanControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterFanControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFanControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFanControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -4897,6 +4987,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5268,6 +5360,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterColorControlAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterColorControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterColorControlAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterColorControlAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -5399,6 +5493,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterBallastConfigurationAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterBallastConfigurationAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5473,6 +5569,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5540,6 +5638,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTemperatureMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5640,6 +5740,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterPressureMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterPressureMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5705,6 +5807,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFlowMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFlowMeasurementAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFlowMeasurementAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -5770,6 +5874,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5892,6 +5998,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterOccupancySensingAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterOccupancySensingAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -5933,6 +6041,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterWakeOnLANAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterWakeOnLANAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterWakeOnLANAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -5980,6 +6090,7 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterChannelAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterChannelAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterChannelAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterChannelAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6028,6 +6139,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterTargetNavigatorAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterTargetNavigatorAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterTargetNavigatorAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6107,6 +6220,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMediaPlaybackAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMediaPlaybackAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6153,6 +6268,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMediaInputAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterMediaInputAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterMediaInputAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterMediaInputAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6186,6 +6303,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterLowPowerAttributeAcceptedCommandListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterLowPowerAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterLowPowerAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterLowPowerAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6222,6 +6341,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterKeypadInputAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterKeypadInputAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterKeypadInputAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterKeypadInputAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6271,6 +6392,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterContentLauncherAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterContentLauncherAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterContentLauncherAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterContentLauncherAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6320,6 +6443,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAudioOutputAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterAudioOutputAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAudioOutputAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAudioOutputAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -6370,6 +6495,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterApplicationLauncherAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterApplicationLauncherAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -6460,6 +6587,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterApplicationBasicAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterApplicationBasicAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -6498,6 +6627,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterAccountLoginAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterAccountLoginAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterAccountLoginAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterAccountLoginAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -7429,6 +7560,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterElectricalMeasurementAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterElectricalMeasurementAttributeAttributeListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, @@ -7439,6 +7572,24 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster ClientMonitoring attributes + MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterClientMonitoringAttributeExpectedClientsID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeAttributeListID, + MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeFeatureMapID, + MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, + // Cluster TestCluster deprecated attribute names MTRClusterTestClusterAttributeBooleanID MTR_DEPRECATED("Please use MTRAttributeIDTypeClusterUnitTestingAttributeBooleanID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @@ -7949,6 +8100,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitTestingAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterUnitTestingAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterUnitTestingAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterUnitTestingAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -7985,6 +8138,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterFaultInjectionAttributeAcceptedCommandListID API_AVAILABLE( ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, + MTRAttributeIDTypeClusterFaultInjectionAttributeEventListID MTR_PROVISIONALLY_AVAILABLE + = MTRAttributeIDTypeGlobalAttributeEventListID, MTRAttributeIDTypeClusterFaultInjectionAttributeAttributeListID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAttributeListID, MTRAttributeIDTypeClusterFaultInjectionAttributeFeatureMapID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @@ -9355,6 +9510,11 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, + // Cluster ClientMonitoring commands + MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRCommandIDTypeClusterClientMonitoringCommandUnregisterClientMonitoringID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + // Cluster TestCluster deprecated command id names MTRClusterTestClusterCommandTestID MTR_DEPRECATED("Please use MTRCommandIDTypeClusterUnitTestingCommandTestID", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index d3e350a7701cf6..70576be2338bdf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -63,6 +63,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -135,6 +137,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -243,6 +247,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -350,6 +356,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -395,6 +403,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -557,6 +567,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -658,6 +670,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -672,6 +686,38 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Pulse Width Modulation + * Cluster to control pulse width modulation + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterPulseWidthModulation : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Descriptor * The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its @@ -703,6 +749,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -745,6 +793,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -809,6 +859,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -904,6 +956,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1021,6 +1075,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1071,6 +1127,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1128,6 +1186,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -1176,6 +1236,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1234,6 +1296,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1279,6 +1343,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1314,6 +1380,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1440,6 +1508,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1521,6 +1591,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1621,6 +1693,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1660,6 +1734,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1725,6 +1801,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -1779,6 +1857,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2010,6 +2090,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2091,6 +2173,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2160,6 +2244,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2174,6 +2260,87 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Time Synchronization + * Accurate time is required for a number of reasons, including scheduling, display and validating +security materials. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterTimeSynchronization : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (void)setUtcTimeWithParams:(MTRTimeSynchronizationClusterSetUtcTimeParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeUTCTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGranularityWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeTimeSourceWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeTrustedTimeNodeIdWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeDefaultNtpWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultNtpWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDefaultNtpWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeTimeZoneWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeZoneWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeTimeZoneWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeDSTOffsetWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDSTOffsetWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeDSTOffsetWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeLocalTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeTimeZoneDatabaseWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeNtpServerPortWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Bridged Device Basic Information * This Cluster serves two purposes towards a Node communicating with a Bridge: indicate that the functionality on @@ -2249,6 +2416,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -2295,6 +2464,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2356,6 +2527,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2454,6 +2627,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2526,6 +2701,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2562,6 +2739,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2604,6 +2783,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2618,6 +2799,102 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Proxy Configuration + * Cluster to control Proxy Configuration + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterProxyConfiguration : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Proxy Discovery + * Cluster to control Proxy Discovery + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterProxyDiscovery : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + +/** + * Cluster Proxy Valid + * Cluster to control Proxy Valid + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterProxyValid : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Boolean State * This cluster provides an interface to a boolean state called StateValue. @@ -2639,6 +2916,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -2708,6 +2987,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3064,6 +3345,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3211,6 +3494,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3330,6 +3615,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3459,6 +3746,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3852,6 +4141,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -3959,6 +4250,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4021,6 +4314,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4382,6 +4677,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4526,6 +4823,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4573,6 +4872,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4617,6 +4918,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4676,6 +4979,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4720,6 +5025,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4764,6 +5071,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4895,6 +5204,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4930,6 +5241,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -4987,6 +5300,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5032,6 +5347,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5187,6 +5504,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5250,6 +5569,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5290,6 +5611,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5328,6 +5651,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5386,6 +5711,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5433,6 +5760,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5495,6 +5824,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5552,6 +5883,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -5604,6 +5937,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6092,6 +6427,8 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -6106,6 +6443,66 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end +/** + * Cluster Client Monitoring + * Client Monitoring allows for ensuring that listed clients meet the required monitoring conditions on the server. + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterClientMonitoring : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (void)registerClientMonitoringWithParams:(MTRClientMonitoringClusterRegisterClientMonitoringParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)unregisterClientMonitoringWithParams:(MTRClientMonitoringClusterUnregisterClientMonitoringParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayAwakeRequestWithParams:(MTRClientMonitoringClusterStayAwakeRequestParams * _Nullable)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)stayAwakeRequestWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeIdleModeIntervalWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeActiveModeIntervalWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeExpectedClientsWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + /** * Cluster Unit Testing * The Test Cluster is meant to validate the generated code @@ -7101,6 +7498,8 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -7115,6 +7514,48 @@ API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @end +/** + * Cluster Fault Injection + * The Fault Injection Cluster provide a means for a test harness to configure faults(for example triggering a fault in the + * system). + */ +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClusterFaultInjection : MTRCluster + +- (instancetype _Nullable)initWithDevice:(MTRDevice *)device + endpointID:(NSNumber *)endpointID + queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_PROVISIONALLY_AVAILABLE; + +- (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries + expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params + MTR_PROVISIONALLY_AVAILABLE; + +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + +@end + MTR_DEPRECATED("Please use MTRClusterBasicInformation", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) @interface MTRClusterBasic : MTRClusterBasicInformation @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 1e2ea16be32dfd..0719d9370afba2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -266,6 +266,14 @@ - (void)writeAttributeIdentifyTimeWithValue:(NSDictionary *)data params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIdentifyID) + attributeID:@(MTRAttributeIDTypeClusterIdentifyAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -804,6 +812,14 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeGroupsID) + attributeID:@(MTRAttributeIDTypeClusterGroupsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -1869,6 +1885,14 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeScenesID) + attributeID:@(MTRAttributeIDTypeClusterScenesAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -2606,6 +2630,14 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSDictionary *)data params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOnOffID) + attributeID:@(MTRAttributeIDTypeClusterOnOffAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -2805,6 +2837,14 @@ - (void)writeAttributeSwitchActionsWithValue:(NSDictionary *)dat params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOnOffSwitchConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterOnOffSwitchConfigurationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -3800,6 +3840,14 @@ - (void)writeAttributeStartUpCurrentLevelWithValue:(NSDictionary params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLevelControlID) + attributeID:@(MTRAttributeIDTypeClusterLevelControlAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4142,6 +4190,14 @@ - (void)writeAttributeReliabilityWithValue:(NSDictionary *)dataV params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBinaryInputBasicID) + attributeID:@(MTRAttributeIDTypeClusterBinaryInputBasicAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4177,6 +4233,71 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q @end +@implementation MTRClusterPulseWidthModulation + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePulseWidthModulationID) + attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePulseWidthModulationID) + attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePulseWidthModulationID) + attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePulseWidthModulationID) + attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePulseWidthModulationID) + attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePulseWidthModulationID) + attributeID:@(MTRAttributeIDTypeClusterPulseWidthModulationAttributeClusterRevisionID) + params:params]; +} + +@end + @implementation MTRClusterDescriptor - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue @@ -4240,6 +4361,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDescriptorID) + attributeID:@(MTRAttributeIDTypeClusterDescriptorAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4337,6 +4466,14 @@ - (void)writeAttributeBindingWithValue:(NSDictionary *)dataValue params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBindingID) + attributeID:@(MTRAttributeIDTypeClusterBindingAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -4483,6 +4620,14 @@ - (void)writeAttributeExtensionWithValue:(NSDictionary *)dataVal params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeAccessControlID) + attributeID:@(MTRAttributeIDTypeClusterAccessControlAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -5457,6 +5602,14 @@ - (void)disableActionWithDurationWithParams:(MTRActionsClusterDisableActionWithD params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeActionsID) + attributeID:@(MTRAttributeIDTypeClusterActionsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -5943,6 +6096,14 @@ - (void)writeAttributeLocalConfigDisabledWithValue:(NSDictionary params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBasicInformationID) + attributeID:@(MTRAttributeIDTypeClusterBasicInformationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6284,6 +6445,14 @@ - (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotify params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOTASoftwareUpdateProviderID) + attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateProviderAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6525,6 +6694,14 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSDictionary params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOTASoftwareUpdateRequestorID) + attributeID:@(MTRAttributeIDTypeClusterOTASoftwareUpdateRequestorAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6657,6 +6834,14 @@ - (void)writeAttributeActiveLocaleWithValue:(NSDictionary *)data params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLocalizationConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterLocalizationConfigurationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6787,6 +6972,14 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSDictionary params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeFormatLocalizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeFormatLocalizationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6880,6 +7073,14 @@ - (void)writeAttributeTemperatureUnitWithValue:(NSDictionary *)d params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeUnitLocalizationID) + attributeID:@(MTRAttributeIDTypeClusterUnitLocalizationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -6956,6 +7157,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePowerSourceConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterPowerSourceConfigurationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -7270,6 +7479,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePowerSourceID) + attributeID:@(MTRAttributeIDTypeClusterPowerSourceAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -7624,6 +7841,14 @@ - (void)writeAttributeBreadcrumbWithValue:(NSDictionary *)dataVa params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeGeneralCommissioningID) + attributeID:@(MTRAttributeIDTypeClusterGeneralCommissioningAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -8289,6 +8514,14 @@ - (void)writeAttributeInterfaceEnabledWithValue:(NSDictionary *) params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeNetworkCommissioningID) + attributeID:@(MTRAttributeIDTypeClusterNetworkCommissioningAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -8525,6 +8758,14 @@ - (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsReque params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDiagnosticLogsID) + attributeID:@(MTRAttributeIDTypeClusterDiagnosticLogsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -8748,6 +8989,14 @@ - (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTrigger params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) + attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -8937,6 +9186,14 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeSoftwareDiagnosticsID) + attributeID:@(MTRAttributeIDTypeClusterSoftwareDiagnosticsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -9620,6 +9877,14 @@ - (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsPara params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeThreadNetworkDiagnosticsID) + attributeID:@(MTRAttributeIDTypeClusterThreadNetworkDiagnosticsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -9898,6 +10163,14 @@ - (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWiFiNetworkDiagnosticsID) + attributeID:@(MTRAttributeIDTypeClusterWiFiNetworkDiagnosticsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10141,6 +10414,14 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeEthernetNetworkDiagnosticsID) + attributeID:@(MTRAttributeIDTypeClusterEthernetNetworkDiagnosticsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10195,6 +10476,302 @@ - (void)resetCountsWithExpectedValues:(NSArray *> * } @end +@implementation MTRClusterTimeSynchronization + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (void)setUtcTimeWithParams:(MTRTimeSynchronizationClusterSetUtcTimeParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeTimeSynchronizationID, + (unsigned int) MTRCommandIDTypeClusterTimeSynchronizationCommandSetUtcTimeID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + TimeSynchronization::Commands::SetUtcTime::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.utcTime = params.utcTime.unsignedLongLongValue; + request.granularity + = static_cast>(params.granularity.unsignedCharValue); + if (params.timeSource != nil) { + auto & definedValue_0 = request.timeSource.Emplace(); + definedValue_0 + = static_cast>(params.timeSource.unsignedCharValue); + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (NSDictionary *)readAttributeUTCTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeUTCTimeID) + params:params]; +} + +- (NSDictionary *)readAttributeGranularityWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGranularityID) + params:params]; +} + +- (NSDictionary *)readAttributeTimeSourceWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeSourceID) + params:params]; +} + +- (NSDictionary *)readAttributeTrustedTimeNodeIdWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeNodeIdID) + params:params]; +} + +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeTrustedTimeNodeIdWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeTrustedTimeNodeIdWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTrustedTimeNodeIdID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeDefaultNtpWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNtpID) + params:params]; +} + +- (void)writeAttributeDefaultNtpWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDefaultNtpWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDefaultNtpWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDefaultNtpID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeTimeZoneWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID) + params:params]; +} + +- (void)writeAttributeTimeZoneWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeTimeZoneWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeTimeZoneWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeDSTOffsetWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetID) + params:params]; +} + +- (void)writeAttributeDSTOffsetWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeDSTOffsetWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeDSTOffsetWithValue:(NSDictionary *)dataValueDictionary + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeDSTOffsetID) + value:dataValueDictionary + expectedValueInterval:expectedValueIntervalMs + timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary *)readAttributeLocalTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeLocalTimeID) + params:params]; +} + +- (NSDictionary *)readAttributeTimeZoneDatabaseWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeTimeZoneDatabaseID) + params:params]; +} + +- (NSDictionary *)readAttributeNtpServerPortWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeNtpServerPortID) + params:params]; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTimeSynchronizationID) + attributeID:@(MTRAttributeIDTypeClusterTimeSynchronizationAttributeClusterRevisionID) + params:params]; +} + +@end + @implementation MTRClusterBridgedDeviceBasicInformation - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue @@ -10381,6 +10958,14 @@ - (void)writeAttributeNodeLabelWithValue:(NSDictionary *)dataVal params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBridgedDeviceBasicInformationID) + attributeID:@(MTRAttributeIDTypeClusterBridgedDeviceBasicInformationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return @@ -10475,6 +11060,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeSwitchID) + attributeID:@(MTRAttributeIDTypeClusterSwitchAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -10795,6 +11388,14 @@ - (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevok params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeAdministratorCommissioningID) + attributeID:@(MTRAttributeIDTypeClusterAdministratorCommissioningAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -11526,6 +12127,14 @@ - (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAdd params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOperationalCredentialsID) + attributeID:@(MTRAttributeIDTypeClusterOperationalCredentialsAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12093,6 +12702,14 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSDictionary *)dataV params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeGroupKeyManagementID) + attributeID:@(MTRAttributeIDTypeClusterGroupKeyManagementAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12217,6 +12834,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFixedLabelID) + attributeID:@(MTRAttributeIDTypeClusterFixedLabelAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12310,6 +12935,14 @@ - (void)writeAttributeLabelListWithValue:(NSDictionary *)dataVal params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeUserLabelID) + attributeID:@(MTRAttributeIDTypeClusterUserLabelAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12345,6 +12978,201 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q @end +@implementation MTRClusterProxyConfiguration + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterProxyConfigurationAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterProxyConfigurationAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterProxyConfigurationAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterProxyConfigurationAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterProxyConfigurationAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterProxyConfigurationAttributeClusterRevisionID) + params:params]; +} + +@end + +@implementation MTRClusterProxyDiscovery + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyDiscoveryID) + attributeID:@(MTRAttributeIDTypeClusterProxyDiscoveryAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyDiscoveryID) + attributeID:@(MTRAttributeIDTypeClusterProxyDiscoveryAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyDiscoveryID) + attributeID:@(MTRAttributeIDTypeClusterProxyDiscoveryAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyDiscoveryID) + attributeID:@(MTRAttributeIDTypeClusterProxyDiscoveryAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyDiscoveryID) + attributeID:@(MTRAttributeIDTypeClusterProxyDiscoveryAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyDiscoveryID) + attributeID:@(MTRAttributeIDTypeClusterProxyDiscoveryAttributeClusterRevisionID) + params:params]; +} + +@end + +@implementation MTRClusterProxyValid + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyValidID) + attributeID:@(MTRAttributeIDTypeClusterProxyValidAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyValidID) + attributeID:@(MTRAttributeIDTypeClusterProxyValidAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyValidID) + attributeID:@(MTRAttributeIDTypeClusterProxyValidAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyValidID) + attributeID:@(MTRAttributeIDTypeClusterProxyValidAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyValidID) + attributeID:@(MTRAttributeIDTypeClusterProxyValidAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeProxyValidID) + attributeID:@(MTRAttributeIDTypeClusterProxyValidAttributeClusterRevisionID) + params:params]; +} + +@end + @implementation MTRClusterBooleanState - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue @@ -12384,6 +13212,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBooleanStateID) + attributeID:@(MTRAttributeIDTypeClusterBooleanStateAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -12604,6 +13440,14 @@ - (void)writeAttributeOnModeWithValue:(NSDictionary *)dataValueD params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeModeSelectID) + attributeID:@(MTRAttributeIDTypeClusterModeSelectAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -14685,6 +15529,14 @@ - (void)writeAttributeExpiringUserTimeoutWithValue:(NSDictionary params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeDoorLockID) + attributeID:@(MTRAttributeIDTypeClusterDoorLockAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -15657,6 +16509,14 @@ - (void)writeAttributeModeWithValue:(NSDictionary *)dataValueDic params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWindowCoveringID) + attributeID:@(MTRAttributeIDTypeClusterWindowCoveringAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -16162,6 +17022,14 @@ - (void)writeAttributeBarrierClosePeriodWithValue:(NSDictionary params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBarrierControlID) + attributeID:@(MTRAttributeIDTypeClusterBarrierControlAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -16530,6 +17398,14 @@ - (void)writeAttributeControlModeWithValue:(NSDictionary *)dataV params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePumpConfigurationAndControlID) + attributeID:@(MTRAttributeIDTypeClusterPumpConfigurationAndControlAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -17847,6 +18723,14 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeThermostatID) + attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -18169,6 +19053,14 @@ - (void)writeAttributeWindSettingWithValue:(NSDictionary *)dataV params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFanControlID) + attributeID:@(MTRAttributeIDTypeClusterFanControlAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -18332,6 +19224,15 @@ - (void)writeAttributeScheduleProgrammingVisibilityWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device + readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeThermostatUserInterfaceConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterThermostatUserInterfaceConfigurationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device @@ -20443,6 +21344,14 @@ - (void)writeAttributeStartUpColorTemperatureMiredsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeColorControlID) + attributeID:@(MTRAttributeIDTypeClusterColorControlAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -21010,6 +21919,14 @@ - (void)writeAttributeLampBurnHoursTripPointWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeBallastConfigurationID) + attributeID:@(MTRAttributeIDTypeClusterBallastConfigurationAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -21134,6 +22051,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeIlluminanceMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterIlluminanceMeasurementAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -21233,6 +22158,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTemperatureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterTemperatureMeasurementAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -21371,6 +22304,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypePressureMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterPressureMeasurementAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -21469,6 +22410,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFlowMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterFlowMeasurementAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -21571,6 +22520,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeRelativeHumidityMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterRelativeHumidityMeasurementAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -21942,6 +22899,14 @@ - (void)writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:(NSD params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeOccupancySensingID) + attributeID:@(MTRAttributeIDTypeClusterOccupancySensingAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -22068,6 +23033,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeWakeOnLANID) + attributeID:@(MTRAttributeIDTypeClusterWakeOnLANAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -22367,6 +23340,14 @@ - (void)skipChannelWithParams:(MTRChannelClusterSkipChannelParams *)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeChannelID) + attributeID:@(MTRAttributeIDTypeClusterChannelAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -22557,6 +23538,14 @@ - (void)navigateTargetWithParams:(MTRTargetNavigatorClusterNavigateTargetParams params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeTargetNavigatorID) + attributeID:@(MTRAttributeIDTypeClusterTargetNavigatorAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -23518,6 +24507,14 @@ - (void)seekWithParams:(MTRMediaPlaybackClusterSeekParams *)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaPlaybackID) + attributeID:@(MTRAttributeIDTypeClusterMediaPlaybackAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -24123,6 +25120,14 @@ - (void)renameInputWithParams:(MTRMediaInputClusterRenameInputParams *)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeMediaInputID) + attributeID:@(MTRAttributeIDTypeClusterMediaInputAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -24320,6 +25325,14 @@ - (void)sleepWithParams:(MTRLowPowerClusterSleepParams * _Nullable)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeLowPowerID) + attributeID:@(MTRAttributeIDTypeClusterLowPowerAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -24475,6 +25488,14 @@ - (void)sendKeyWithParams:(MTRKeypadInputClusterSendKeyParams *)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeKeypadInputID) + attributeID:@(MTRAttributeIDTypeClusterKeypadInputAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -24889,6 +25910,14 @@ - (void)writeAttributeSupportedStreamingProtocolsWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeContentLauncherID) + attributeID:@(MTRAttributeIDTypeClusterContentLauncherAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -25136,6 +26165,14 @@ - (void)renameOutputWithParams:(MTRAudioOutputClusterRenameOutputParams *)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeAudioOutputID) + attributeID:@(MTRAttributeIDTypeClusterAudioOutputAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -25489,6 +26526,14 @@ - (void)writeAttributeCurrentAppWithValue:(NSDictionary *)dataVa params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeApplicationLauncherID) + attributeID:@(MTRAttributeIDTypeClusterApplicationLauncherAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -25661,6 +26706,14 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpoi params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeApplicationBasicID) + attributeID:@(MTRAttributeIDTypeClusterApplicationBasicAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -25948,6 +27001,14 @@ - (void)logoutWithParams:(MTRAccountLoginClusterLogoutParams * _Nullable)params params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeAccountLoginID) + attributeID:@(MTRAttributeIDTypeClusterAccountLoginAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -27441,6 +28502,14 @@ - (void)writeAttributeAcOverloadAlarmsMaskWithValue:(NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeElectricalMeasurementID) + attributeID:@(MTRAttributeIDTypeClusterElectricalMeasurementAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -27505,6 +28574,317 @@ - (void)getMeasurementProfileCommandWithParams:(MTRElectricalMeasurementClusterG } @end +@implementation MTRClusterClientMonitoring + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (void)registerClientMonitoringWithParams:(MTRClientMonitoringClusterRegisterClientMonitoringParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeClientMonitoringID, + (unsigned int) MTRCommandIDTypeClusterClientMonitoringCommandRegisterClientMonitoringID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ClientMonitoring::Commands::RegisterClientMonitoring::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.clientNodeId = params.clientNodeId.unsignedLongLongValue; + request.ICid = params.iCid.unsignedLongLongValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (void)unregisterClientMonitoringWithParams:(MTRClientMonitoringClusterUnregisterClientMonitoringParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeClientMonitoringID, + (unsigned int) MTRCommandIDTypeClusterClientMonitoringCommandUnregisterClientMonitoringID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ClientMonitoring::Commands::UnregisterClientMonitoring::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.clientNodeId = params.clientNodeId.unsignedLongLongValue; + request.ICid = params.iCid.unsignedLongLongValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (void)stayAwakeRequestWithExpectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + [self stayAwakeRequestWithParams:nil + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + completion:completion]; +} +- (void)stayAwakeRequestWithParams:(MTRClientMonitoringClusterStayAwakeRequestParams * _Nullable)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeClientMonitoringID, + (unsigned int) MTRCommandIDTypeClusterClientMonitoringCommandStayAwakeRequestID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + ClientMonitoring::Commands::StayAwakeRequest::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (NSDictionary *)readAttributeIdleModeIntervalWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeIdleModeIntervalID) + params:params]; +} + +- (NSDictionary *)readAttributeActiveModeIntervalWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeIntervalID) + params:params]; +} + +- (NSDictionary *)readAttributeActiveModeThresholdWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeActiveModeThresholdID) + params:params]; +} + +- (NSDictionary *)readAttributeExpectedClientsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeExpectedClientsID) + params:params]; +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeClientMonitoringID) + attributeID:@(MTRAttributeIDTypeClusterClientMonitoringAttributeClusterRevisionID) + params:params]; +} + +@end + @implementation MTRClusterUnitTesting - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue @@ -32085,6 +33465,14 @@ - (void)writeAttributeWriteOnlyInt8uWithValue:(NSDictionary *)da params:params]; } +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeUnitTestingID) + attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeEventListID) + params:params]; +} + - (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(_endpoint) @@ -32500,4 +33888,211 @@ - (void)testEmitTestFabricScopedEventRequestWithParams:(MTRTestClusterClusterTes } @end +@implementation MTRClusterFaultInjection + +- (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue +{ + if (self = [super initWithQueue:queue]) { + if (device == nil) { + return nil; + } + + _endpoint = [endpointID unsignedShortValue]; + _device = device; + } + return self; +} + +- (void)failAtFaultWithParams:(MTRFaultInjectionClusterFailAtFaultParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeFaultInjectionID, + (unsigned int) MTRCommandIDTypeClusterFaultInjectionCommandFailAtFaultID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + FaultInjection::Commands::FailAtFault::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.numCallsToSkip = params.numCallsToSkip.unsignedIntValue; + request.numCallsToFail = params.numCallsToFail.unsignedIntValue; + request.takeMutex = params.takeMutex.boolValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (void)failRandomlyAtFaultWithParams:(MTRFaultInjectionClusterFailRandomlyAtFaultParams *)params + expectedValues:(NSArray *> *)expectedValues + expectedValueInterval:(NSNumber *)expectedValueIntervalMs + completion:(MTRStatusCompletion)completion +{ + NSString * logPrefix = [NSString stringWithFormat:@"MTRDevice command %u %u %u %u", self.device.deviceController.fabricIndex, + _endpoint, (unsigned int) MTRClusterIDTypeFaultInjectionID, + (unsigned int) MTRCommandIDTypeClusterFaultInjectionCommandFailRandomlyAtFaultID]; + // Make a copy of params before we go async. + params = [params copy]; + NSNumber * timedInvokeTimeoutMsParam = params.timedInvokeTimeoutMs; + if (timedInvokeTimeoutMsParam) { + timedInvokeTimeoutMsParam = MTRClampedNumber(timedInvokeTimeoutMsParam, @(1), @(UINT16_MAX)); + } + MTRAsyncCallbackQueueWorkItem * workItem = [[MTRAsyncCallbackQueueWorkItem alloc] initWithQueue:self.device.queue]; + MTRAsyncCallbackReadyHandler readyHandler = ^(MTRDevice * device, NSUInteger retryCount) { + MTRClustersLogDequeue(logPrefix, self.device.asyncCallbackWorkQueue); + MTRBaseDevice * baseDevice = [[MTRBaseDevice alloc] initWithNodeID:self.device.nodeID + controller:self.device.deviceController]; + auto * bridge = new MTRCommandSuccessCallbackBridge( + self.device.queue, + ^(id _Nullable value, NSError * _Nullable error) { + MTRClustersLogCompletion(logPrefix, value, error); + dispatch_async(self.callbackQueue, ^{ + completion(error); + }); + [workItem endWork]; + }, + ^(ExchangeManager & exchangeManager, const SessionHandle & session, CommandSuccessCallbackType successCb, + MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + auto * typedBridge = static_cast(bridge); + Optional timedInvokeTimeoutMs; + Optional invokeTimeout; + ListFreer listFreer; + FaultInjection::Commands::FailRandomlyAtFault::Type request; + if (timedInvokeTimeoutMsParam != nil) { + timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); + } + if (params != nil) { + if (params.serverSideProcessingTimeout != nil) { + // Clamp to a number of seconds that will not overflow 32-bit + // int when converted to ms. + auto * serverSideProcessingTimeout + = MTRClampedNumber(params.serverSideProcessingTimeout, @(0), @(UINT16_MAX)); + invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); + } + } + request.type = static_cast>(params.type.unsignedCharValue); + request.id = params.id.unsignedIntValue; + request.percentage = params.percentage.unsignedCharValue; + + return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, + self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); + }); + std::move(*bridge).DispatchAction(baseDevice); + }; + workItem.readyHandler = readyHandler; + MTRClustersLogEnqueue(logPrefix, self.device.asyncCallbackWorkQueue); + [self.device.asyncCallbackWorkQueue enqueueWorkItem:workItem]; + + if (!expectedValueIntervalMs || ([expectedValueIntervalMs compare:@(0)] == NSOrderedAscending)) { + expectedValues = nil; + } else { + expectedValueIntervalMs = MTRClampedNumber(expectedValueIntervalMs, @(1), @(UINT32_MAX)); + } + if (expectedValues) { + [self.device setExpectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs]; + } +} + +- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFaultInjectionID) + attributeID:@(MTRAttributeIDTypeClusterFaultInjectionAttributeGeneratedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFaultInjectionID) + attributeID:@(MTRAttributeIDTypeClusterFaultInjectionAttributeAcceptedCommandListID) + params:params]; +} + +- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFaultInjectionID) + attributeID:@(MTRAttributeIDTypeClusterFaultInjectionAttributeEventListID) + params:params]; +} + +- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFaultInjectionID) + attributeID:@(MTRAttributeIDTypeClusterFaultInjectionAttributeAttributeListID) + params:params]; +} + +- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFaultInjectionID) + attributeID:@(MTRAttributeIDTypeClusterFaultInjectionAttributeFeatureMapID) + params:params]; +} + +- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(_endpoint) + clusterID:@(MTRClusterIDTypeFaultInjectionID) + attributeID:@(MTRAttributeIDTypeClusterFaultInjectionAttributeClusterRevisionID) + params:params]; +} + +@end + // NOLINTEND(clang-analyzer-cplusplus.NewDeleteLeaks) diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index 01db1693d8f8e5..39cb4b5c39e49d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -58,6 +58,11 @@ @property (nonatomic, readonly) MTRDevice * device; @end +@interface MTRClusterPulseWidthModulation () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end + @interface MTRClusterDescriptor () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @@ -158,6 +163,11 @@ @property (nonatomic, readonly) MTRDevice * device; @end +@interface MTRClusterTimeSynchronization () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end + @interface MTRClusterBridgedDeviceBasicInformation () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @@ -193,6 +203,21 @@ @property (nonatomic, readonly) MTRDevice * device; @end +@interface MTRClusterProxyConfiguration () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end + +@interface MTRClusterProxyDiscovery () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end + +@interface MTRClusterProxyValid () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end + @interface MTRClusterBooleanState () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @@ -343,7 +368,17 @@ @property (nonatomic, readonly) MTRDevice * device; @end +@interface MTRClusterClientMonitoring () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end + @interface MTRClusterUnitTesting () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; @end + +@interface MTRClusterFaultInjection () +@property (nonatomic, readonly) uint16_t endpoint; +@property (nonatomic, readonly) MTRDevice * device; +@end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 2e257f43660372..d38986a7725552 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -6921,6 +6921,98 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClientMonitoringClusterRegisterClientMonitoringParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull iCid MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClientMonitoringClusterUnregisterClientMonitoringParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull iCid MTR_PROVISIONALLY_AVAILABLE; +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClientMonitoringClusterStayAwakeRequestParams : NSObject +/** + * Controls whether the command is a timed command (using Timed Invoke). + * + * If nil (the default value), a regular invoke is done for commands that do + * not require a timed invoke and a timed invoke with some default timed request + * timeout is done for commands that require a timed invoke. + * + * If not nil, a timed invoke is done, with the provided value used as the timed + * request timeout. The value should be chosen small enough to provide the + * desired security properties but large enough that it will allow a round-trip + * from the sever to the client (for the status response and actual invoke + * request) within the timeout window. + * + */ +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; + +/** + * Controls how much time, in seconds, we will allow for the server to process the command. + * + * The command will then time out if that much time, plus an allowance for retransmits due to network failures, passes. + * + * If nil, the framework will try to select an appropriate timeout value itself. + */ +@property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; +@end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterTestParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index b0a66d4e6484ee..e4bb970f827c66 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -7999,6 +7999,101 @@ - (NSString *)description return descriptionString; } +@end +@implementation MTRClientMonitoringClusterRegisterClientMonitoringParams +- (instancetype)init +{ + if (self = [super init]) { + + _clientNodeId = @(0); + + _iCid = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRClientMonitoringClusterRegisterClientMonitoringParams alloc] init]; + + other.clientNodeId = self.clientNodeId; + other.iCid = self.iCid; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; >", NSStringFromClass([self class]), _clientNodeId, _iCid]; + return descriptionString; +} + +@end +@implementation MTRClientMonitoringClusterUnregisterClientMonitoringParams +- (instancetype)init +{ + if (self = [super init]) { + + _clientNodeId = @(0); + + _iCid = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRClientMonitoringClusterUnregisterClientMonitoringParams alloc] init]; + + other.clientNodeId = self.clientNodeId; + other.iCid = self.iCid; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = + [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; >", NSStringFromClass([self class]), _clientNodeId, _iCid]; + return descriptionString; +} + +@end +@implementation MTRClientMonitoringClusterStayAwakeRequestParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRClientMonitoringClusterStayAwakeRequestParams alloc] init]; + + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; +} + @end @implementation MTRUnitTestingClusterTestParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index d36a169791c077..8678c3bed81115 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -105,6 +105,16 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } break; } + case Clusters::PulseWidthModulation::Id: { + using namespace Clusters::PulseWidthModulation; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case Clusters::Descriptor::Id: { using namespace Clusters::Descriptor; switch (aPath.mEventId) { @@ -1201,6 +1211,16 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } break; } + case Clusters::TimeSynchronization::Id: { + using namespace Clusters::TimeSynchronization; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case Clusters::BridgedDeviceBasicInformation::Id: { using namespace Clusters::BridgedDeviceBasicInformation; switch (aPath.mEventId) { @@ -1467,6 +1487,36 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } break; } + case Clusters::ProxyConfiguration::Id: { + using namespace Clusters::ProxyConfiguration; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case Clusters::ProxyDiscovery::Id: { + using namespace Clusters::ProxyDiscovery; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } + case Clusters::ProxyValid::Id: { + using namespace Clusters::ProxyValid; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case Clusters::BooleanState::Id: { using namespace Clusters::BooleanState; switch (aPath.mEventId) { @@ -2256,6 +2306,16 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } break; } + case Clusters::ClientMonitoring::Id: { + using namespace Clusters::ClientMonitoring; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } case Clusters::UnitTesting::Id: { using namespace Clusters::UnitTesting; switch (aPath.mEventId) { @@ -2377,6 +2437,16 @@ id MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVReader & aRead } break; } + case Clusters::FaultInjection::Id: { + using namespace Clusters::FaultInjection; + switch (aPath.mEventId) { + + default: + *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; + break; + } + break; + } default: { *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index f0711c27592b29..460630b693ac0f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -992,6 +992,13 @@ MTR_DEPRECATED("Please use MTRApplicationBasicClusterApplicationStruct", ios(16. @interface MTRApplicationBasicClusterApplicationBasicApplication : MTRApplicationBasicClusterApplicationStruct @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRClientMonitoringClusterMonitoringRegistration : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull iCid MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; +@end + API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) @interface MTRUnitTestingClusterSimpleStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull a API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index d079a7173770b8..9633fa7e2347c1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -3926,6 +3926,40 @@ - (NSString * _Nonnull)applicationId @implementation MTRApplicationBasicClusterApplicationBasicApplication : MTRApplicationBasicClusterApplicationStruct @end +@implementation MTRClientMonitoringClusterMonitoringRegistration +- (instancetype)init +{ + if (self = [super init]) { + + _clientNodeId = @(0); + + _iCid = @(0); + + _fabricIndex = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRClientMonitoringClusterMonitoringRegistration alloc] init]; + + other.clientNodeId = self.clientNodeId; + other.iCid = self.iCid; + other.fabricIndex = self.fabricIndex; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: clientNodeId:%@; iCid:%@; fabricIndex:%@; >", + NSStringFromClass([self class]), _clientNodeId, _iCid, _fabricIndex]; + return descriptionString; +} + +@end + @implementation MTRUnitTestingClusterSimpleStruct - (instancetype)init { diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index 6dd1d09dfa0a55..a9a1f76021f747 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 @@ -1555,7 +1555,7 @@ namespace Attributes { namespace ActiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -1585,7 +1585,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -1615,7 +1615,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace InactiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, sizeof(zclString)); @@ -2171,7 +2171,7 @@ namespace Attributes { namespace SetupURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[512 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Actions::Id, Id, zclString, sizeof(zclString)); @@ -2269,7 +2269,7 @@ namespace Attributes { namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BasicInformation::Id, Id, zclString, sizeof(zclString)); @@ -2680,7 +2680,7 @@ namespace Attributes { namespace ActiveLocale { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[35 + 1]; EmberAfStatus status = @@ -3138,7 +3138,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3734,7 +3734,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace BatReplacementDescription { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3795,7 +3795,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B namespace BatANSIDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -3825,7 +3825,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace BatIECDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, sizeof(zclString)); @@ -5492,7 +5492,7 @@ namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5555,7 +5555,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) namespace ProductName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5587,7 +5587,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5650,7 +5650,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5713,7 +5713,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace SoftwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5745,7 +5745,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ManufacturingDate { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = @@ -5777,7 +5777,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5809,7 +5809,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[256 + 2]; EmberAfStatus status = @@ -5841,7 +5841,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace ProductLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; EmberAfStatus status = @@ -5873,7 +5873,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace SerialNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -5936,7 +5936,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace UniqueID { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = @@ -6840,7 +6840,7 @@ namespace Attributes { namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, sizeof(zclString)); @@ -7763,7 +7763,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Language { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[3 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, sizeof(zclString)); @@ -13479,7 +13479,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace CompensationText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[254 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, sizeof(zclString)); @@ -15506,7 +15506,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace LampType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); @@ -15536,7 +15536,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace LampManufacturer { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, sizeof(zclString)); @@ -17829,7 +17829,7 @@ namespace Attributes { namespace MACAddress { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, sizeof(zclString)); @@ -18937,7 +18937,7 @@ namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -18998,7 +18998,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value) namespace ApplicationName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -19090,7 +19090,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas namespace ApplicationVersion { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, sizeof(zclString)); @@ -24228,7 +24228,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, double value) namespace OctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[10 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -24258,7 +24258,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) namespace LongOctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[1000 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -24288,7 +24288,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) namespace CharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[10 + 1]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); @@ -24318,7 +24318,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) namespace LongCharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[1000 + 2]; EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, sizeof(zclString)); 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 2d919d595c757b..f4e243e70525e6 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 @@ -302,17 +302,17 @@ namespace BinaryInputBasic { namespace Attributes { namespace ActiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ActiveText namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description namespace InactiveText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace InactiveText @@ -427,7 +427,7 @@ namespace Actions { namespace Attributes { namespace SetupURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SetupURL @@ -448,7 +448,7 @@ namespace BasicInformation { namespace Attributes { namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace NodeLabel @@ -529,7 +529,7 @@ namespace LocalizationConfiguration { namespace Attributes { namespace ActiveLocale { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ActiveLocale @@ -625,7 +625,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace Order namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description @@ -714,7 +714,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace BatPresent namespace BatReplacementDescription { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatReplacementDescription @@ -725,12 +725,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::B } // namespace BatCommonDesignation namespace BatANSIDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatANSIDesignation namespace BatIECDesignation { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace BatIECDesignation @@ -1040,7 +1040,7 @@ namespace BridgedDeviceBasicInformation { namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName @@ -1050,12 +1050,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ProductName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductName namespace NodeLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace NodeLabel @@ -1065,7 +1065,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); } // namespace HardwareVersion namespace HardwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace HardwareVersionString @@ -1075,32 +1075,32 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); } // namespace SoftwareVersion namespace SoftwareVersionString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SoftwareVersionString namespace ManufacturingDate { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ManufacturingDate namespace PartNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace PartNumber namespace ProductURL { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductURL namespace ProductLabel { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ProductLabel namespace SerialNumber { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace SerialNumber @@ -1110,7 +1110,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace Reachable namespace UniqueID { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace UniqueID @@ -1311,7 +1311,7 @@ namespace ModeSelect { namespace Attributes { namespace Description { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Description @@ -1462,7 +1462,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfCredentialsSupportedPerUser namespace Language { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace Language @@ -2371,7 +2371,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace DriftCompensation namespace CompensationText { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace CompensationText @@ -2683,12 +2683,12 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace LampQuantity namespace LampType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LampType namespace LampManufacturer { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LampManufacturer @@ -3063,7 +3063,7 @@ namespace WakeOnLan { namespace Attributes { namespace MACAddress { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace MACAddress @@ -3286,7 +3286,7 @@ namespace ApplicationBasic { namespace Attributes { namespace VendorName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace VendorName @@ -3296,7 +3296,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::VendorId value); } // namespace VendorID namespace ApplicationName { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ApplicationName @@ -3312,7 +3312,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBas } // namespace Status namespace ApplicationVersion { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace ApplicationVersion @@ -4165,22 +4165,22 @@ EmberAfStatus Set(chip::EndpointId endpoint, double value); } // namespace FloatDouble namespace OctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // octet_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); } // namespace OctetString namespace LongOctetString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan value); // long_octet_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // long_octet_string EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); } // namespace LongOctetString namespace CharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace CharString namespace LongCharString { -EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan value); // long_char_string +EmberAfStatus Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); } // namespace LongCharString diff --git a/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h index cdeb96347a0132..dcb93f3806b370 100644 --- a/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/tests/simulated-cluster-objects.h @@ -864,6 +864,181 @@ struct DiscoveryCommandResponse } }; +struct BooleanEqualsCommand +{ + bool Value1; + bool Value2; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Value1)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), Value2)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value1)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value2)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct SignedNumberEqualsCommand +{ + int64_t Value1; + int64_t Value2; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Value1)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), Value2)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value1)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value2)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct UnsignedNumberEqualsCommand +{ + uint64_t Value1; + uint64_t Value2; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Value1)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(1), Value2)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value1)); + break; + case 1: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Value2)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + +struct EqualityResponse +{ + bool Equals; + + CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const + { + chip::TLV::TLVType outer; + ReturnErrorOnFailure(writer.StartContainer(tag, chip::TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::ContextTag(0), Equals)); + ReturnErrorOnFailure(writer.EndContainer(outer)); + return CHIP_NO_ERROR; + } + + CHIP_ERROR Decode(chip::TLV::TLVReader & reader) + { + CHIP_ERROR err = CHIP_NO_ERROR; + chip::TLV::TLVType outer; + VerifyOrReturnError(chip::TLV::kTLVType_Structure == reader.GetType(), CHIP_ERROR_WRONG_TLV_TYPE); + ReturnErrorOnFailure(reader.EnterContainer(outer)); + + while ((err = reader.Next()) == CHIP_NO_ERROR) + { + VerifyOrReturnError(chip::TLV::IsContextTag(reader.GetTag()), CHIP_ERROR_INVALID_TLV_TAG); + switch (chip::TLV::TagNumFromTag(reader.GetTag())) + { + case 0: + ReturnErrorOnFailure(chip::app::DataModel::Decode(reader, Equals)); + break; + default: + break; + } + } + + VerifyOrReturnError(err == CHIP_END_OF_TLV, err); + ReturnErrorOnFailure(reader.ExitContainer(outer)); + + return CHIP_NO_ERROR; + } +}; + struct LogCommand { chip::CharSpan message; @@ -1309,6 +1484,23 @@ using DecodableType = struct DiscoveryCommandResponse; } // namespace Commands } // namespace DiscoveryCommands +namespace EqualityCommands { +namespace Commands { +namespace BooleanEquals { +using Type = struct BooleanEqualsCommand; +} +namespace SignedNumberEquals { +using Type = struct SignedNumberEqualsCommand; +} +namespace UnsignedNumberEquals { +using Type = struct UnsignedNumberEqualsCommand; +} +namespace EqualityResponse { +using DecodableType = struct EqualityResponse; +} +} // namespace Commands +} // namespace EqualityCommands + namespace LogCommands { namespace Commands { namespace Log { diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index fec7a5add44c0c..2d59f397ff5cf4 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -521,6 +521,72 @@ class SubscribeAttributeIdentifyAcceptedCommandList : public SubscribeAttribute } }; +/* + * Attribute EventList + */ +class ReadIdentifyEventList : public ReadAttribute { +public: + ReadIdentifyEventList() + : ReadAttribute("event-list") + { + } + + ~ReadIdentifyEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Identify.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Identify EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeIdentifyEventList : public SubscribeAttribute { +public: + SubscribeAttributeIdentifyEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeIdentifyEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000003) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterIdentify alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Identify.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -1225,6 +1291,72 @@ class SubscribeAttributeGroupsAcceptedCommandList : public SubscribeAttribute { } }; +/* + * Attribute EventList + */ +class ReadGroupsEventList : public ReadAttribute { +public: + ReadGroupsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadGroupsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Groups.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Groups EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeGroupsEventList : public SubscribeAttribute { +public: + SubscribeAttributeGroupsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeGroupsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000004) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Groups.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -2556,6 +2688,72 @@ class SubscribeAttributeScenesAcceptedCommandList : public SubscribeAttribute { } }; +/* + * Attribute EventList + */ +class ReadScenesEventList : public ReadAttribute { +public: + ReadScenesEventList() + : ReadAttribute("event-list") + { + } + + ~ReadScenesEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Scenes.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Scenes EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeScenesEventList : public SubscribeAttribute { +public: + SubscribeAttributeScenesEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeScenesEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000005) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterScenes alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Scenes.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -3615,6 +3813,72 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { } }; +/* + * Attribute EventList + */ +class ReadOnOffEventList : public ReadAttribute { +public: + ReadOnOffEventList() + : ReadAttribute("event-list") + { + } + + ~ReadOnOffEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.EventList response %@", [value description]); + if (error != nil) { + LogNSError("OnOff EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOnOffEventList : public SubscribeAttribute { +public: + SubscribeAttributeOnOffEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeOnOffEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000006) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOff.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -4151,6 +4415,76 @@ class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public Sub } }; +/* + * Attribute EventList + */ +class ReadOnOffSwitchConfigurationEventList : public ReadAttribute { +public: + ReadOnOffSwitchConfigurationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadOnOffSwitchConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); + if (error != nil) { + LogNSError("OnOffSwitchConfiguration EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttribute { +public: + SubscribeAttributeOnOffSwitchConfigurationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeOnOffSwitchConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000007) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -6282,6 +6616,76 @@ class SubscribeAttributeLevelControlAcceptedCommandList : public SubscribeAttrib } }; +/* + * Attribute EventList + */ +class ReadLevelControlEventList : public ReadAttribute { +public: + ReadLevelControlEventList() + : ReadAttribute("event-list") + { + } + + ~ReadLevelControlEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LevelControl.EventList response %@", [value description]); + if (error != nil) { + LogNSError("LevelControl EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLevelControlEventList : public SubscribeAttribute { +public: + SubscribeAttributeLevelControlEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeLevelControlEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000008) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LevelControl.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -7533,6 +7937,76 @@ class SubscribeAttributeBinaryInputBasicAcceptedCommandList : public SubscribeAt } }; +/* + * Attribute EventList + */ +class ReadBinaryInputBasicEventList : public ReadAttribute { +public: + ReadBinaryInputBasicEventList() + : ReadAttribute("event-list") + { + } + + ~ReadBinaryInputBasicEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BinaryInputBasic.EventList response %@", [value description]); + if (error != nil) { + LogNSError("BinaryInputBasic EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBinaryInputBasicEventList : public SubscribeAttribute { +public: + SubscribeAttributeBinaryInputBasicEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeBinaryInputBasicEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000000F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBinaryInputBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BinaryInputBasic.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -7743,6 +8217,442 @@ class SubscribeAttributeBinaryInputBasicClusterRevision : public SubscribeAttrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster PulseWidthModulation | 0x001C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute GeneratedCommandList + */ +class ReadPulseWidthModulationGeneratedCommandList : public ReadAttribute { +public: + ReadPulseWidthModulationGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadPulseWidthModulationGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("PulseWidthModulation GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePulseWidthModulationGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributePulseWidthModulationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributePulseWidthModulationGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadPulseWidthModulationAcceptedCommandList : public ReadAttribute { +public: + ReadPulseWidthModulationAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadPulseWidthModulationAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("PulseWidthModulation AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePulseWidthModulationAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributePulseWidthModulationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributePulseWidthModulationAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadPulseWidthModulationEventList : public ReadAttribute { +public: + ReadPulseWidthModulationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadPulseWidthModulationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.EventList response %@", [value description]); + if (error != nil) { + LogNSError("PulseWidthModulation EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePulseWidthModulationEventList : public SubscribeAttribute { +public: + SubscribeAttributePulseWidthModulationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributePulseWidthModulationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadPulseWidthModulationAttributeList : public ReadAttribute { +public: + ReadPulseWidthModulationAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadPulseWidthModulationAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("PulseWidthModulation AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePulseWidthModulationAttributeList : public SubscribeAttribute { +public: + SubscribeAttributePulseWidthModulationAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributePulseWidthModulationAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadPulseWidthModulationFeatureMap : public ReadAttribute { +public: + ReadPulseWidthModulationFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadPulseWidthModulationFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("PulseWidthModulation FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePulseWidthModulationFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributePulseWidthModulationFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributePulseWidthModulationFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadPulseWidthModulationClusterRevision : public ReadAttribute { +public: + ReadPulseWidthModulationClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadPulseWidthModulationClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("PulseWidthModulation ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePulseWidthModulationClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributePulseWidthModulationClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributePulseWidthModulationClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPulseWidthModulation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PulseWidthModulation.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /*----------------------------------------------------------------------------*\ | Cluster Descriptor | 0x001D | |------------------------------------------------------------------------------| @@ -8183,6 +9093,76 @@ class SubscribeAttributeDescriptorAcceptedCommandList : public SubscribeAttribut } }; +/* + * Attribute EventList + */ +class ReadDescriptorEventList : public ReadAttribute { +public: + ReadDescriptorEventList() + : ReadAttribute("event-list") + { + } + + ~ReadDescriptorEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Descriptor EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDescriptorEventList : public SubscribeAttribute { +public: + SubscribeAttributeDescriptorEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeDescriptorEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDescriptor alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Descriptor.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -8683,6 +9663,72 @@ class SubscribeAttributeBindingAcceptedCommandList : public SubscribeAttribute { } }; +/* + * Attribute EventList + */ +class ReadBindingEventList : public ReadAttribute { +public: + ReadBindingEventList() + : ReadAttribute("event-list") + { + } + + ~ReadBindingEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Binding EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBindingEventList : public SubscribeAttribute { +public: + SubscribeAttributeBindingEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeBindingEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBinding alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Binding.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -9556,6 +10602,76 @@ class SubscribeAttributeAccessControlAcceptedCommandList : public SubscribeAttri } }; +/* + * Attribute EventList + */ +class ReadAccessControlEventList : public ReadAttribute { +public: + ReadAccessControlEventList() + : ReadAttribute("event-list") + { + } + + ~ReadAccessControlEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.EventList response %@", [value description]); + if (error != nil) { + LogNSError("AccessControl EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeAccessControlEventList : public SubscribeAttribute { +public: + SubscribeAttributeAccessControlEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeAccessControlEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000001F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccessControl.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -10739,6 +11855,72 @@ class SubscribeAttributeActionsAcceptedCommandList : public SubscribeAttribute { } }; +/* + * Attribute EventList + */ +class ReadActionsEventList : public ReadAttribute { +public: + ReadActionsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadActionsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Actions EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActionsEventList : public SubscribeAttribute { +public: + SubscribeAttributeActionsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeActionsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000025) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -12715,6 +13897,76 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt } }; +/* + * Attribute EventList + */ +class ReadBasicInformationEventList : public ReadAttribute { +public: + ReadBasicInformationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadBasicInformationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.EventList response %@", [value description]); + if (error != nil) { + LogNSError("BasicInformation EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeBasicInformationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000028) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -13274,6 +14526,76 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su } }; +/* + * Attribute EventList + */ +class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderEventList() + : ReadAttribute("event-list") + { + } + + ~ReadOtaSoftwareUpdateProviderEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + if (error != nil) { + LogNSError("OTASoftwareUpdateProvider EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateProviderEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateProviderEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000029) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -14051,6 +15373,76 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S } }; +/* + * Attribute EventList + */ +class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateRequestorEventList() + : ReadAttribute("event-list") + { + } + + ~ReadOtaSoftwareUpdateRequestorEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + if (error != nil) { + LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateRequestorEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateRequestorEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -14601,6 +15993,76 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su } }; +/* + * Attribute EventList + */ +class ReadLocalizationConfigurationEventList : public ReadAttribute { +public: + ReadLocalizationConfigurationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadLocalizationConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + if (error != nil) { + LogNSError("LocalizationConfiguration EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAttribute { +public: + SubscribeAttributeLocalizationConfigurationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeLocalizationConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -15260,6 +16722,76 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc } }; +/* + * Attribute EventList + */ +class ReadTimeFormatLocalizationEventList : public ReadAttribute { +public: + ReadTimeFormatLocalizationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadTimeFormatLocalizationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + if (error != nil) { + LogNSError("TimeFormatLocalization EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttribute { +public: + SubscribeAttributeTimeFormatLocalizationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeTimeFormatLocalizationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -15737,6 +17269,76 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt } }; +/* + * Attribute EventList + */ +class ReadUnitLocalizationEventList : public ReadAttribute { +public: + ReadUnitLocalizationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadUnitLocalizationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.EventList response %@", [value description]); + if (error != nil) { + LogNSError("UnitLocalization EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { +public: + SubscribeAttributeUnitLocalizationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeUnitLocalizationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -16174,6 +17776,76 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub } }; +/* + * Attribute EventList + */ +class ReadPowerSourceConfigurationEventList : public ReadAttribute { +public: + ReadPowerSourceConfigurationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadPowerSourceConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + if (error != nil) { + LogNSError("PowerSourceConfiguration EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttribute { +public: + SubscribeAttributePowerSourceConfigurationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributePowerSourceConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -18744,6 +20416,76 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu } }; +/* + * Attribute EventList + */ +class ReadPowerSourceEventList : public ReadAttribute { +public: + ReadPowerSourceEventList() + : ReadAttribute("event-list") + { + } + + ~ReadPowerSourceEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EventList response %@", [value description]); + if (error != nil) { + LogNSError("PowerSource EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { +public: + SubscribeAttributePowerSourceEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributePowerSourceEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000002F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -19660,6 +21402,76 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri } }; +/* + * Attribute EventList + */ +class ReadGeneralCommissioningEventList : public ReadAttribute { +public: + ReadGeneralCommissioningEventList() + : ReadAttribute("event-list") + { + } + + ~ReadGeneralCommissioningEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + if (error != nil) { + LogNSError("GeneralCommissioning EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribute { +public: + SubscribeAttributeGeneralCommissioningEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeGeneralCommissioningEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000030) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -20980,6 +22792,76 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri } }; +/* + * Attribute EventList + */ +class ReadNetworkCommissioningEventList : public ReadAttribute { +public: + ReadNetworkCommissioningEventList() + : ReadAttribute("event-list") + { + } + + ~ReadNetworkCommissioningEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + if (error != nil) { + LogNSError("NetworkCommissioning EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribute { +public: + SubscribeAttributeNetworkCommissioningEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeNetworkCommissioningEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000031) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -21405,6 +23287,76 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr } }; +/* + * Attribute EventList + */ +class ReadDiagnosticLogsEventList : public ReadAttribute { +public: + ReadDiagnosticLogsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadDiagnosticLogsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + if (error != nil) { + LogNSError("DiagnosticLogs EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { +public: + SubscribeAttributeDiagnosticLogsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeDiagnosticLogsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000032) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -22463,6 +24415,76 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe } }; +/* + * Attribute EventList + */ +class ReadGeneralDiagnosticsEventList : public ReadAttribute { +public: + ReadGeneralDiagnosticsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadGeneralDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + if (error != nil) { + LogNSError("GeneralDiagnostics EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute { +public: + SubscribeAttributeGeneralDiagnosticsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeGeneralDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000033) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -23158,6 +25180,76 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib } }; +/* + * Attribute EventList + */ +class ReadSoftwareDiagnosticsEventList : public ReadAttribute { +public: + ReadSoftwareDiagnosticsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadSoftwareDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + if (error != nil) { + LogNSError("SoftwareDiagnostics EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute { +public: + SubscribeAttributeSoftwareDiagnosticsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeSoftwareDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000034) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -28047,6 +30139,76 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub } }; +/* + * Attribute EventList + */ +class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { +public: + ReadThreadNetworkDiagnosticsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadThreadNetworkDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + if (error != nil) { + LogNSError("ThreadNetworkDiagnostics EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttribute { +public: + SubscribeAttributeThreadNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeThreadNetworkDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000035) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -29383,6 +31545,76 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc } }; +/* + * Attribute EventList + */ +class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { +public: + ReadWiFiNetworkDiagnosticsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadWiFiNetworkDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + if (error != nil) { + LogNSError("WiFiNetworkDiagnostics EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttribute { +public: + SubscribeAttributeWiFiNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeWiFiNetworkDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000036) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -30432,6 +32664,76 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S } }; +/* + * Attribute EventList + */ +class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { +public: + ReadEthernetNetworkDiagnosticsEventList() + : ReadAttribute("event-list") + { + } + + ~ReadEthernetNetworkDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + if (error != nil) { + LogNSError("EthernetNetworkDiagnostics EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAttribute { +public: + SubscribeAttributeEthernetNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeEthernetNetworkDiagnosticsEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000037) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -30643,27 +32945,22 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc }; /*----------------------------------------------------------------------------*\ -| Cluster BridgedDeviceBasicInformation | 0x0039 | +| Cluster TimeSynchronization | 0x0038 | |------------------------------------------------------------------------------| | Commands: | | +| * SetUtcTime | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * VendorName | 0x0001 | -| * VendorID | 0x0002 | -| * ProductName | 0x0003 | -| * NodeLabel | 0x0005 | -| * HardwareVersion | 0x0007 | -| * HardwareVersionString | 0x0008 | -| * SoftwareVersion | 0x0009 | -| * SoftwareVersionString | 0x000A | -| * ManufacturingDate | 0x000B | -| * PartNumber | 0x000C | -| * ProductURL | 0x000D | -| * ProductLabel | 0x000E | -| * SerialNumber | 0x000F | -| * Reachable | 0x0011 | -| * UniqueID | 0x0012 | -| * ProductAppearance | 0x0014 | +| * UTCTime | 0x0000 | +| * Granularity | 0x0001 | +| * TimeSource | 0x0002 | +| * TrustedTimeNodeId | 0x0003 | +| * DefaultNtp | 0x0004 | +| * TimeZone | 0x0005 | +| * DSTOffset | 0x0006 | +| * LocalTime | 0x0007 | +| * TimeZoneDatabase | 0x0008 | +| * NtpServerPort | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -30672,36 +32969,86 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * StartUp | 0x0000 | -| * ShutDown | 0x0001 | -| * Leave | 0x0002 | -| * ReachableChanged | 0x0003 | \*----------------------------------------------------------------------------*/ /* - * Attribute VendorName + * Command SetUtcTime */ -class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { +class TimeSynchronizationSetUtcTime : public ClusterCommand { public: - ReadBridgedDeviceBasicInformationVendorName() - : ReadAttribute("vendor-name") + TimeSynchronizationSetUtcTime() + : ClusterCommand("set-utc-time") { + AddArgument("UtcTime", 0, UINT64_MAX, &mRequest.utcTime); + AddArgument("Granularity", 0, UINT8_MAX, &mRequest.granularity); + AddArgument("TimeSource", 0, UINT8_MAX, &mRequest.timeSource); + ClusterCommand::AddArguments(); } - ~ReadBridgedDeviceBasicInformationVendorName() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000038) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetUtcTimeParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.utcTime = [NSNumber numberWithUnsignedLongLong:mRequest.utcTime]; + params.granularity = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.granularity)]; + if (mRequest.timeSource.HasValue()) { + params.timeSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.timeSource.Value())]; + } else { + params.timeSource = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setUtcTimeWithParams:params + completion:^(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::TimeSynchronization::Commands::SetUtcTime::Type mRequest; +}; + +/* + * Attribute UTCTime + */ +class ReadTimeSynchronizationUTCTime : public ReadAttribute { +public: + ReadTimeSynchronizationUTCTime() + : ReadAttribute("utctime") + { + } + + ~ReadTimeSynchronizationUTCTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUTCTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); + LogNSError("TimeSynchronization UTCTime read Error", error); } SetCommandExitStatus(error); }]; @@ -30709,22 +33056,22 @@ class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationVendorName() - : SubscribeAttribute("vendor-name") + SubscribeAttributeTimeSynchronizationUTCTime() + : SubscribeAttribute("utctime") { } - ~SubscribeAttributeBridgedDeviceBasicInformationVendorName() {} + ~SubscribeAttributeTimeSynchronizationUTCTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30735,12 +33082,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorNameWithParams:params + [cluster subscribeAttributeUTCTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -30749,29 +33096,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri }; /* - * Attribute VendorID + * Attribute Granularity */ -class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { +class ReadTimeSynchronizationGranularity : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationVendorID() - : ReadAttribute("vendor-id") + ReadTimeSynchronizationGranularity() + : ReadAttribute("granularity") { } - ~ReadBridgedDeviceBasicInformationVendorID() {} + ~ReadTimeSynchronizationGranularity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGranularityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.Granularity response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); + LogNSError("TimeSynchronization Granularity read Error", error); } SetCommandExitStatus(error); }]; @@ -30779,22 +33126,22 @@ class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeTimeSynchronizationGranularity() + : SubscribeAttribute("granularity") { } - ~SubscribeAttributeBridgedDeviceBasicInformationVendorID() {} + ~SubscribeAttributeTimeSynchronizationGranularity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30805,12 +33152,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributeGranularityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + NSLog(@"TimeSynchronization.Granularity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -30819,29 +33166,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe }; /* - * Attribute ProductName + * Attribute TimeSource */ -class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { +class ReadTimeSynchronizationTimeSource : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductName() - : ReadAttribute("product-name") + ReadTimeSynchronizationTimeSource() + : ReadAttribute("time-source") { } - ~ReadBridgedDeviceBasicInformationProductName() {} + ~ReadTimeSynchronizationTimeSource() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTimeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); + LogNSError("TimeSynchronization TimeSource read Error", error); } SetCommandExitStatus(error); }]; @@ -30849,22 +33196,22 @@ class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductName : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductName() - : SubscribeAttribute("product-name") + SubscribeAttributeTimeSynchronizationTimeSource() + : SubscribeAttribute("time-source") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductName() {} + ~SubscribeAttributeTimeSynchronizationTimeSource() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30875,12 +33222,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductNameWithParams:params + [cluster subscribeAttributeTimeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); SetCommandExitStatus(error); }]; @@ -30889,29 +33236,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr }; /* - * Attribute NodeLabel + * Attribute TrustedTimeNodeId */ -class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { +class ReadTimeSynchronizationTrustedTimeNodeId : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationNodeLabel() - : ReadAttribute("node-label") + ReadTimeSynchronizationTrustedTimeNodeId() + : ReadAttribute("trusted-time-node-id") { } - ~ReadBridgedDeviceBasicInformationNodeLabel() {} + ~ReadTimeSynchronizationTrustedTimeNodeId() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTrustedTimeNodeIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TrustedTimeNodeId response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); + LogNSError("TimeSynchronization TrustedTimeNodeId read Error", error); } SetCommandExitStatus(error); }]; @@ -30919,64 +33266,62 @@ class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { } }; -class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { +class WriteTimeSynchronizationTrustedTimeNodeId : public WriteAttribute { public: - WriteBridgedDeviceBasicInformationNodeLabel() - : WriteAttribute("node-label") + WriteTimeSynchronizationTrustedTimeNodeId() + : WriteAttribute("trusted-time-node-id") { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); + AddArgument("attr-name", "trusted-time-node-id"); + AddArgument("attr-value", 0, UINT64_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBridgedDeviceBasicInformationNodeLabel() {} + ~WriteTimeSynchronizationTrustedTimeNodeId() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) WriteAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) WriteAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedLongLong:mValue]; - [cluster writeAttributeNodeLabelWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeTrustedTimeNodeIdWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeSynchronization TrustedTimeNodeId write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::ByteSpan mValue; + chip::NodeId mValue; }; -class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTrustedTimeNodeId : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() - : SubscribeAttribute("node-label") + SubscribeAttributeTimeSynchronizationTrustedTimeNodeId() + : SubscribeAttribute("trusted-time-node-id") { } - ~SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() {} + ~SubscribeAttributeTimeSynchronizationTrustedTimeNodeId() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30987,12 +33332,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNodeLabelWithParams:params + [cluster subscribeAttributeTrustedTimeNodeIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TrustedTimeNodeId response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31001,29 +33346,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib }; /* - * Attribute HardwareVersion + * Attribute DefaultNtp */ -class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { +class ReadTimeSynchronizationDefaultNtp : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationHardwareVersion() - : ReadAttribute("hardware-version") + ReadTimeSynchronizationDefaultNtp() + : ReadAttribute("default-ntp") { } - ~ReadBridgedDeviceBasicInformationHardwareVersion() {} + ~ReadTimeSynchronizationDefaultNtp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDefaultNtpWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DefaultNtp response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); + LogNSError("TimeSynchronization DefaultNtp read Error", error); } SetCommandExitStatus(error); }]; @@ -31031,22 +33376,64 @@ class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public SubscribeAttribute { +class WriteTimeSynchronizationDefaultNtp : public WriteAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() - : SubscribeAttribute("hardware-version") + WriteTimeSynchronizationDefaultNtp() + : WriteAttribute("default-ntp") { + AddArgument("attr-name", "default-ntp"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() {} + ~WriteTimeSynchronizationDefaultNtp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nullable value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeDefaultNtpWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeSynchronization DefaultNtp write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeTimeSynchronizationDefaultNtp : public SubscribeAttribute { +public: + SubscribeAttributeTimeSynchronizationDefaultNtp() + : SubscribeAttribute("default-ntp") + { + } + + ~SubscribeAttributeTimeSynchronizationDefaultNtp() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31057,12 +33444,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionWithParams:params + [cluster subscribeAttributeDefaultNtpWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DefaultNtp response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31071,29 +33458,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su }; /* - * Attribute HardwareVersionString + * Attribute TimeZone */ -class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttribute { +class ReadTimeSynchronizationTimeZone : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationHardwareVersionString() - : ReadAttribute("hardware-version-string") + ReadTimeSynchronizationTimeZone() + : ReadAttribute("time-zone") { } - ~ReadBridgedDeviceBasicInformationHardwareVersionString() {} + ~ReadTimeSynchronizationTimeZone() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTimeZoneWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); + LogNSError("TimeSynchronization TimeZone read Error", error); } SetCommandExitStatus(error); }]; @@ -31101,38 +33488,99 @@ class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttrib } }; -class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : public SubscribeAttribute { +class WriteTimeSynchronizationTimeZone : public WriteAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() - : SubscribeAttribute("hardware-version-string") + WriteTimeSynchronizationTimeZone() + : WriteAttribute("time-zone") + , mComplex(&mValue) { + AddArgument("attr-name", "time-zone"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() {} + ~WriteTimeSynchronizationTimeZone() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeHardwareVersionStringWithParams:params + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() + length:entry_0.name.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + [array_0 addObject:newElement_0]; + } + value = array_0; + } + + [cluster writeAttributeTimeZoneWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeSynchronization TimeZone write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> + mComplex; +}; + +class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute { +public: + SubscribeAttributeTimeSynchronizationTimeZone() + : SubscribeAttribute("time-zone") + { + } + + ~SubscribeAttributeTimeSynchronizationTimeZone() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeTimeZoneWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31141,29 +33589,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub }; /* - * Attribute SoftwareVersion + * Attribute DSTOffset */ -class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { +class ReadTimeSynchronizationDSTOffset : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationSoftwareVersion() - : ReadAttribute("software-version") + ReadTimeSynchronizationDSTOffset() + : ReadAttribute("dstoffset") { } - ~ReadBridgedDeviceBasicInformationSoftwareVersion() {} + ~ReadTimeSynchronizationDSTOffset() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDSTOffsetWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); + LogNSError("TimeSynchronization DSTOffset read Error", error); } SetCommandExitStatus(error); }]; @@ -31171,22 +33619,77 @@ class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public SubscribeAttribute { +class WriteTimeSynchronizationDSTOffset : public WriteAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() - : SubscribeAttribute("software-version") + WriteTimeSynchronizationDSTOffset() + : WriteAttribute("dstoffset") + , mComplex(&mValue) { + AddArgument("attr-name", "dstoffset"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() {} + ~WriteTimeSynchronizationDSTOffset() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; + newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil]; + [array_0 addObject:newElement_0]; + } + value = array_0; + } + + [cluster writeAttributeDSTOffsetWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeSynchronization DSTOffset write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> + mComplex; +}; + +class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute { +public: + SubscribeAttributeTimeSynchronizationDSTOffset() + : SubscribeAttribute("dstoffset") + { + } + + ~SubscribeAttributeTimeSynchronizationDSTOffset() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000006) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31197,12 +33700,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionWithParams:params + [cluster subscribeAttributeDSTOffsetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31211,29 +33714,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public Su }; /* - * Attribute SoftwareVersionString + * Attribute LocalTime */ -class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttribute { +class ReadTimeSynchronizationLocalTime : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationSoftwareVersionString() - : ReadAttribute("software-version-string") + ReadTimeSynchronizationLocalTime() + : ReadAttribute("local-time") { } - ~ReadBridgedDeviceBasicInformationSoftwareVersionString() {} + ~ReadTimeSynchronizationLocalTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLocalTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); + LogNSError("TimeSynchronization LocalTime read Error", error); } SetCommandExitStatus(error); }]; @@ -31241,22 +33744,22 @@ class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttrib } }; -class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() - : SubscribeAttribute("software-version-string") + SubscribeAttributeTimeSynchronizationLocalTime() + : SubscribeAttribute("local-time") { } - ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() {} + ~SubscribeAttributeTimeSynchronizationLocalTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31267,12 +33770,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionStringWithParams:params + [cluster subscribeAttributeLocalTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31281,29 +33784,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : pub }; /* - * Attribute ManufacturingDate + * Attribute TimeZoneDatabase */ -class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute { +class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationManufacturingDate() - : ReadAttribute("manufacturing-date") + ReadTimeSynchronizationTimeZoneDatabase() + : ReadAttribute("time-zone-database") { } - ~ReadBridgedDeviceBasicInformationManufacturingDate() {} + ~ReadTimeSynchronizationTimeZoneDatabase() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTimeZoneDatabaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); + LogNSError("TimeSynchronization TimeZoneDatabase read Error", error); } SetCommandExitStatus(error); }]; @@ -31311,22 +33814,22 @@ class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute } }; -class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() - : SubscribeAttribute("manufacturing-date") + SubscribeAttributeTimeSynchronizationTimeZoneDatabase() + : SubscribeAttribute("time-zone-database") { } - ~SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() {} + ~SubscribeAttributeTimeSynchronizationTimeZoneDatabase() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31337,12 +33840,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeManufacturingDateWithParams:params + [cluster subscribeAttributeTimeZoneDatabaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31351,29 +33854,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public }; /* - * Attribute PartNumber + * Attribute NtpServerPort */ -class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { +class ReadTimeSynchronizationNtpServerPort : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationPartNumber() - : ReadAttribute("part-number") + ReadTimeSynchronizationNtpServerPort() + : ReadAttribute("ntp-server-port") { } - ~ReadBridgedDeviceBasicInformationPartNumber() {} + ~ReadTimeSynchronizationNtpServerPort() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNtpServerPortWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.NtpServerPort response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); + LogNSError("TimeSynchronization NtpServerPort read Error", error); } SetCommandExitStatus(error); }]; @@ -31381,22 +33884,22 @@ class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationNtpServerPort : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationPartNumber() - : SubscribeAttribute("part-number") + SubscribeAttributeTimeSynchronizationNtpServerPort() + : SubscribeAttribute("ntp-server-port") { } - ~SubscribeAttributeBridgedDeviceBasicInformationPartNumber() {} + ~SubscribeAttributeTimeSynchronizationNtpServerPort() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31407,12 +33910,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartNumberWithParams:params + [cluster subscribeAttributeNtpServerPortWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.NtpServerPort response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31421,29 +33924,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public Subscri }; /* - * Attribute ProductURL + * Attribute GeneratedCommandList */ -class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { +class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductURL() - : ReadAttribute("product-url") + ReadTimeSynchronizationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBridgedDeviceBasicInformationProductURL() {} + ~ReadTimeSynchronizationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation ProductURL read Error", error); + LogNSError("TimeSynchronization GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -31451,22 +33954,22 @@ class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductURL() - : SubscribeAttribute("product-url") + SubscribeAttributeTimeSynchronizationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductURL() {} + ~SubscribeAttributeTimeSynchronizationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31477,12 +33980,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductURLWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31491,29 +33994,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri }; /* - * Attribute ProductLabel + * Attribute AcceptedCommandList */ -class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { +class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductLabel() - : ReadAttribute("product-label") + ReadTimeSynchronizationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBridgedDeviceBasicInformationProductLabel() {} + ~ReadTimeSynchronizationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation ProductLabel read Error", error); + LogNSError("TimeSynchronization AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -31521,22 +34024,22 @@ class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductLabel() - : SubscribeAttribute("product-label") + SubscribeAttributeTimeSynchronizationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductLabel() {} + ~SubscribeAttributeTimeSynchronizationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31547,12 +34050,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductLabelWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31561,29 +34064,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc }; /* - * Attribute SerialNumber + * Attribute EventList */ -class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { +class ReadTimeSynchronizationEventList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationSerialNumber() - : ReadAttribute("serial-number") + ReadTimeSynchronizationEventList() + : ReadAttribute("event-list") { } - ~ReadBridgedDeviceBasicInformationSerialNumber() {} + ~ReadTimeSynchronizationEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.EventList response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation SerialNumber read Error", error); + LogNSError("TimeSynchronization EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -31591,22 +34094,22 @@ class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() - : SubscribeAttribute("serial-number") + SubscribeAttributeTimeSynchronizationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() {} + ~SubscribeAttributeTimeSynchronizationEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31617,12 +34120,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSerialNumberWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31631,29 +34134,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc }; /* - * Attribute Reachable + * Attribute AttributeList */ -class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { +class ReadTimeSynchronizationAttributeList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationReachable() - : ReadAttribute("reachable") + ReadTimeSynchronizationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBridgedDeviceBasicInformationReachable() {} + ~ReadTimeSynchronizationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation Reachable read Error", error); + LogNSError("TimeSynchronization AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -31661,22 +34164,22 @@ class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationReachable : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationReachable() - : SubscribeAttribute("reachable") + SubscribeAttributeTimeSynchronizationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationReachable() {} + ~SubscribeAttributeTimeSynchronizationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31687,12 +34190,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReachableWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31701,29 +34204,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib }; /* - * Attribute UniqueID + * Attribute FeatureMap */ -class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { +class ReadTimeSynchronizationFeatureMap : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationUniqueID() - : ReadAttribute("unique-id") + ReadTimeSynchronizationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBridgedDeviceBasicInformationUniqueID() {} + ~ReadTimeSynchronizationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation UniqueID read Error", error); + LogNSError("TimeSynchronization FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -31731,22 +34234,22 @@ class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationUniqueID() - : SubscribeAttribute("unique-id") + SubscribeAttributeTimeSynchronizationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBridgedDeviceBasicInformationUniqueID() {} + ~SubscribeAttributeTimeSynchronizationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31757,12 +34260,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUniqueIDWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31771,30 +34274,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe }; /* - * Attribute ProductAppearance + * Attribute ClusterRevision */ -class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute { +class ReadTimeSynchronizationClusterRevision : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductAppearance() - : ReadAttribute("product-appearance") + ReadTimeSynchronizationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBridgedDeviceBasicInformationProductAppearance() {} + ~ReadTimeSynchronizationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductAppearanceWithCompletion:^( - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); + LogNSError("TimeSynchronization ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -31802,22 +34304,22 @@ class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() - : SubscribeAttribute("product-appearance") + SubscribeAttributeTimeSynchronizationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() {} + ~SubscribeAttributeTimeSynchronizationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000038) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -31828,13 +34330,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductAppearanceWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^( - MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31842,30 +34343,66 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public } }; +/*----------------------------------------------------------------------------*\ +| Cluster BridgedDeviceBasicInformation | 0x0039 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0001 | +| * VendorID | 0x0002 | +| * ProductName | 0x0003 | +| * NodeLabel | 0x0005 | +| * HardwareVersion | 0x0007 | +| * HardwareVersionString | 0x0008 | +| * SoftwareVersion | 0x0009 | +| * SoftwareVersionString | 0x000A | +| * ManufacturingDate | 0x000B | +| * PartNumber | 0x000C | +| * ProductURL | 0x000D | +| * ProductLabel | 0x000E | +| * SerialNumber | 0x000F | +| * Reachable | 0x0011 | +| * UniqueID | 0x0012 | +| * ProductAppearance | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute GeneratedCommandList + * Attribute VendorName */ -class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBridgedDeviceBasicInformationVendorName() + : ReadAttribute("vendor-name") { } - ~ReadBridgedDeviceBasicInformationGeneratedCommandList() {} + ~ReadBridgedDeviceBasicInformationVendorName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); } SetCommandExitStatus(error); }]; @@ -31873,18 +34410,18 @@ class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBridgedDeviceBasicInformationVendorName() + : SubscribeAttribute("vendor-name") { } - ~SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationVendorName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -31899,12 +34436,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31913,29 +34450,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ }; /* - * Attribute AcceptedCommandList + * Attribute VendorID */ -class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBridgedDeviceBasicInformationVendorID() + : ReadAttribute("vendor-id") { } - ~ReadBridgedDeviceBasicInformationAcceptedCommandList() {} + ~ReadBridgedDeviceBasicInformationVendorID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); } SetCommandExitStatus(error); }]; @@ -31943,18 +34480,18 @@ class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBridgedDeviceBasicInformationVendorID() + : SubscribeAttribute("vendor-id") { } - ~SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationVendorID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -31969,12 +34506,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); SetCommandExitStatus(error); }]; @@ -31983,29 +34520,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi }; /* - * Attribute AttributeList + * Attribute ProductName */ -class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationAttributeList() - : ReadAttribute("attribute-list") + ReadBridgedDeviceBasicInformationProductName() + : ReadAttribute("product-name") { } - ~ReadBridgedDeviceBasicInformationAttributeList() {} + ~ReadBridgedDeviceBasicInformationProductName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); } SetCommandExitStatus(error); }]; @@ -32013,18 +34550,18 @@ class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductName : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeBridgedDeviceBasicInformationProductName() + : SubscribeAttribute("product-name") { } - ~SubscribeAttributeBridgedDeviceBasicInformationAttributeList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationProductName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -32039,12 +34576,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeProductNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32053,29 +34590,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs }; /* - * Attribute FeatureMap + * Attribute NodeLabel */ -class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { +class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationFeatureMap() - : ReadAttribute("feature-map") + ReadBridgedDeviceBasicInformationNodeLabel() + : ReadAttribute("node-label") { } - ~ReadBridgedDeviceBasicInformationFeatureMap() {} + ~ReadBridgedDeviceBasicInformationNodeLabel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); + LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); } SetCommandExitStatus(error); }]; @@ -32083,18 +34620,60 @@ class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public SubscribeAttribute { +class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() - : SubscribeAttribute("feature-map") + WriteBridgedDeviceBasicInformationNodeLabel() + : WriteAttribute("node-label") { + AddArgument("attr-name", "node-label"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() {} + ~WriteBridgedDeviceBasicInformationNodeLabel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) WriteAttribute (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeNodeLabelWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public SubscribeAttribute { +public: + SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() + : SubscribeAttribute("node-label") + { + } + + ~SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -32109,12 +34688,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeNodeLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32123,29 +34702,29 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri }; /* - * Attribute ClusterRevision + * Attribute HardwareVersion */ -class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { +class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationClusterRevision() - : ReadAttribute("cluster-revision") + ReadBridgedDeviceBasicInformationHardwareVersion() + : ReadAttribute("hardware-version") { } - ~ReadBridgedDeviceBasicInformationClusterRevision() {} + ~ReadBridgedDeviceBasicInformationHardwareVersion() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); if (error != nil) { - LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); + LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); } SetCommandExitStatus(error); }]; @@ -32153,18 +34732,18 @@ class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() + : SubscribeAttribute("hardware-version") { } - ~SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() {} + ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) @@ -32179,12 +34758,12 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeHardwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32192,54 +34771,30 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su } }; -/*----------------------------------------------------------------------------*\ -| Cluster Switch | 0x003B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * NumberOfPositions | 0x0000 | -| * CurrentPosition | 0x0001 | -| * MultiPressMax | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SwitchLatched | 0x0000 | -| * InitialPress | 0x0001 | -| * LongPress | 0x0002 | -| * ShortRelease | 0x0003 | -| * LongRelease | 0x0004 | -| * MultiPressOngoing | 0x0005 | -| * MultiPressComplete | 0x0006 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute NumberOfPositions + * Attribute HardwareVersionString */ -class ReadSwitchNumberOfPositions : public ReadAttribute { +class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttribute { public: - ReadSwitchNumberOfPositions() - : ReadAttribute("number-of-positions") + ReadBridgedDeviceBasicInformationHardwareVersionString() + : ReadAttribute("hardware-version-string") { } - ~ReadSwitchNumberOfPositions() {} + ~ReadBridgedDeviceBasicInformationHardwareVersionString() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.NumberOfPositions response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); if (error != nil) { - LogNSError("Switch NumberOfPositions read Error", error); + LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); } SetCommandExitStatus(error); }]; @@ -32247,20 +34802,22 @@ class ReadSwitchNumberOfPositions : public ReadAttribute { } }; -class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeSwitchNumberOfPositions() - : SubscribeAttribute("number-of-positions") + SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() + : SubscribeAttribute("hardware-version-string") { } - ~SubscribeAttributeSwitchNumberOfPositions() {} + ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32271,12 +34828,12 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPositionsWithParams:params + [cluster subscribeAttributeHardwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.NumberOfPositions response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32285,27 +34842,29 @@ class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { }; /* - * Attribute CurrentPosition + * Attribute SoftwareVersion */ -class ReadSwitchCurrentPosition : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { public: - ReadSwitchCurrentPosition() - : ReadAttribute("current-position") + ReadBridgedDeviceBasicInformationSoftwareVersion() + : ReadAttribute("software-version") { } - ~ReadSwitchCurrentPosition() {} + ~ReadBridgedDeviceBasicInformationSoftwareVersion() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.CurrentPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); if (error != nil) { - LogNSError("Switch CurrentPosition read Error", error); + LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); } SetCommandExitStatus(error); }]; @@ -32313,20 +34872,22 @@ class ReadSwitchCurrentPosition : public ReadAttribute { } }; -class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public SubscribeAttribute { public: - SubscribeAttributeSwitchCurrentPosition() - : SubscribeAttribute("current-position") + SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() + : SubscribeAttribute("software-version") { } - ~SubscribeAttributeSwitchCurrentPosition() {} + ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32337,12 +34898,12 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionWithParams:params + [cluster subscribeAttributeSoftwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.CurrentPosition response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32351,27 +34912,29 @@ class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { }; /* - * Attribute MultiPressMax + * Attribute SoftwareVersionString */ -class ReadSwitchMultiPressMax : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttribute { public: - ReadSwitchMultiPressMax() - : ReadAttribute("multi-press-max") + ReadBridgedDeviceBasicInformationSoftwareVersionString() + : ReadAttribute("software-version-string") { } - ~ReadSwitchMultiPressMax() {} + ~ReadBridgedDeviceBasicInformationSoftwareVersionString() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.MultiPressMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); if (error != nil) { - LogNSError("Switch MultiPressMax read Error", error); + LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); } SetCommandExitStatus(error); }]; @@ -32379,20 +34942,22 @@ class ReadSwitchMultiPressMax : public ReadAttribute { } }; -class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeSwitchMultiPressMax() - : SubscribeAttribute("multi-press-max") + SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() + : SubscribeAttribute("software-version-string") { } - ~SubscribeAttributeSwitchMultiPressMax() {} + ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32403,12 +34968,12 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMultiPressMaxWithParams:params + [cluster subscribeAttributeSoftwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.MultiPressMax response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32417,27 +34982,29 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute ManufacturingDate */ -class ReadSwitchGeneratedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute { public: - ReadSwitchGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBridgedDeviceBasicInformationManufacturingDate() + : ReadAttribute("manufacturing-date") { } - ~ReadSwitchGeneratedCommandList() {} + ~ReadBridgedDeviceBasicInformationManufacturingDate() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); if (error != nil) { - LogNSError("Switch GeneratedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); } SetCommandExitStatus(error); }]; @@ -32445,20 +35012,22 @@ class ReadSwitchGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public SubscribeAttribute { public: - SubscribeAttributeSwitchGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() + : SubscribeAttribute("manufacturing-date") { } - ~SubscribeAttributeSwitchGeneratedCommandList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32469,12 +35038,12 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeManufacturingDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32483,27 +35052,29 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { }; /* - * Attribute AcceptedCommandList + * Attribute PartNumber */ -class ReadSwitchAcceptedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { public: - ReadSwitchAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBridgedDeviceBasicInformationPartNumber() + : ReadAttribute("part-number") { } - ~ReadSwitchAcceptedCommandList() {} + ~ReadBridgedDeviceBasicInformationPartNumber() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); if (error != nil) { - LogNSError("Switch AcceptedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); } SetCommandExitStatus(error); }]; @@ -32511,20 +35082,22 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public SubscribeAttribute { public: - SubscribeAttributeSwitchAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBridgedDeviceBasicInformationPartNumber() + : SubscribeAttribute("part-number") { } - ~SubscribeAttributeSwitchAcceptedCommandList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationPartNumber() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32535,12 +35108,12 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePartNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32549,27 +35122,29 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { }; /* - * Attribute AttributeList + * Attribute ProductURL */ -class ReadSwitchAttributeList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { public: - ReadSwitchAttributeList() - : ReadAttribute("attribute-list") + ReadBridgedDeviceBasicInformationProductURL() + : ReadAttribute("product-url") { } - ~ReadSwitchAttributeList() {} + ~ReadBridgedDeviceBasicInformationProductURL() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); if (error != nil) { - LogNSError("Switch AttributeList read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductURL read Error", error); } SetCommandExitStatus(error); }]; @@ -32577,20 +35152,22 @@ class ReadSwitchAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public SubscribeAttribute { public: - SubscribeAttributeSwitchAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeBridgedDeviceBasicInformationProductURL() + : SubscribeAttribute("product-url") { } - ~SubscribeAttributeSwitchAttributeList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationProductURL() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32601,12 +35178,12 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeProductURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32615,27 +35192,29 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute ProductLabel */ -class ReadSwitchFeatureMap : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { public: - ReadSwitchFeatureMap() - : ReadAttribute("feature-map") + ReadBridgedDeviceBasicInformationProductLabel() + : ReadAttribute("product-label") { } - ~ReadSwitchFeatureMap() {} + ~ReadBridgedDeviceBasicInformationProductLabel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); if (error != nil) { - LogNSError("Switch FeatureMap read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductLabel read Error", error); } SetCommandExitStatus(error); }]; @@ -32643,20 +35222,22 @@ class ReadSwitchFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public SubscribeAttribute { public: - SubscribeAttributeSwitchFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeBridgedDeviceBasicInformationProductLabel() + : SubscribeAttribute("product-label") { } - ~SubscribeAttributeSwitchFeatureMap() {} + ~SubscribeAttributeBridgedDeviceBasicInformationProductLabel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32667,12 +35248,12 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeProductLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.FeatureMap response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32681,27 +35262,29 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute SerialNumber */ -class ReadSwitchClusterRevision : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { public: - ReadSwitchClusterRevision() - : ReadAttribute("cluster-revision") + ReadBridgedDeviceBasicInformationSerialNumber() + : ReadAttribute("serial-number") { } - ~ReadSwitchClusterRevision() {} + ~ReadBridgedDeviceBasicInformationSerialNumber() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); if (error != nil) { - LogNSError("Switch ClusterRevision read Error", error); + LogNSError("BridgedDeviceBasicInformation SerialNumber read Error", error); } SetCommandExitStatus(error); }]; @@ -32709,20 +35292,22 @@ class ReadSwitchClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public SubscribeAttribute { public: - SubscribeAttributeSwitchClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() + : SubscribeAttribute("serial-number") { } - ~SubscribeAttributeSwitchClusterRevision() {} + ~SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32733,12 +35318,12 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeSerialNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.ClusterRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32746,196 +35331,100 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster AdministratorCommissioning | 0x003C | -|------------------------------------------------------------------------------| -| Commands: | | -| * OpenCommissioningWindow | 0x00 | -| * OpenBasicCommissioningWindow | 0x01 | -| * RevokeCommissioning | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * WindowStatus | 0x0000 | -| * AdminFabricIndex | 0x0001 | -| * AdminVendorId | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command OpenCommissioningWindow + * Attribute Reachable */ -class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { +class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { public: - AdministratorCommissioningOpenCommissioningWindow() - : ClusterCommand("open-commissioning-window") - { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); - AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); - AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); - AddArgument("Salt", &mRequest.salt); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadBridgedDeviceBasicInformationReachable() + : ReadAttribute("reachable") { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; - params.pakePasscodeVerifier = [NSData dataWithBytes:mRequest.PAKEPasscodeVerifier.data() - length:mRequest.PAKEPasscodeVerifier.size()]; - params.discriminator = [NSNumber numberWithUnsignedShort:mRequest.discriminator]; - params.iterations = [NSNumber numberWithUnsignedInt:mRequest.iterations]; - params.salt = [NSData dataWithBytes:mRequest.salt.data() length:mRequest.salt.size()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster openCommissioningWindowWithParams:params - completion:^(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::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; -}; - -/* - * Command OpenBasicCommissioningWindow - */ -class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand { -public: - AdministratorCommissioningOpenBasicCommissioningWindow() - : ClusterCommand("open-basic-commissioning-window") - { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); - ClusterCommand::AddArguments(); - } + ~ReadBridgedDeviceBasicInformationReachable() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster openBasicCommissioningWindowWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + if (error != nil) { + LogNSError("BridgedDeviceBasicInformation Reachable read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; }; -/* - * Command RevokeCommissioning - */ -class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { +class SubscribeAttributeBridgedDeviceBasicInformationReachable : public SubscribeAttribute { public: - AdministratorCommissioningRevokeCommissioning() - : ClusterCommand("revoke-commissioning") + SubscribeAttributeBridgedDeviceBasicInformationReachable() + : SubscribeAttribute("reachable") { - ClusterCommand::AddArguments(); } + ~SubscribeAttributeBridgedDeviceBasicInformationReachable() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster revokeCommissioningWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeReachableWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; /* - * Attribute WindowStatus + * Attribute UniqueID */ -class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { +class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { public: - ReadAdministratorCommissioningWindowStatus() - : ReadAttribute("window-status") + ReadBridgedDeviceBasicInformationUniqueID() + : ReadAttribute("unique-id") { } - ~ReadAdministratorCommissioningWindowStatus() {} + ~ReadBridgedDeviceBasicInformationUniqueID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning WindowStatus read Error", error); + LogNSError("BridgedDeviceBasicInformation UniqueID read Error", error); } SetCommandExitStatus(error); }]; @@ -32943,22 +35432,22 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningWindowStatus() - : SubscribeAttribute("window-status") + SubscribeAttributeBridgedDeviceBasicInformationUniqueID() + : SubscribeAttribute("unique-id") { } - ~SubscribeAttributeAdministratorCommissioningWindowStatus() {} + ~SubscribeAttributeBridgedDeviceBasicInformationUniqueID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -32969,12 +35458,12 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWindowStatusWithParams:params + [cluster subscribeAttributeUniqueIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); SetCommandExitStatus(error); }]; @@ -32983,29 +35472,30 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib }; /* - * Attribute AdminFabricIndex + * Attribute ProductAppearance */ -class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute { public: - ReadAdministratorCommissioningAdminFabricIndex() - : ReadAttribute("admin-fabric-index") + ReadBridgedDeviceBasicInformationProductAppearance() + : ReadAttribute("product-appearance") { } - ~ReadAdministratorCommissioningAdminFabricIndex() {} + ~ReadBridgedDeviceBasicInformationProductAppearance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeProductAppearanceWithCompletion:^( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); } SetCommandExitStatus(error); }]; @@ -33013,22 +35503,22 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminFabricIndex() - : SubscribeAttribute("admin-fabric-index") + SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() + : SubscribeAttribute("product-appearance") { } - ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() {} + ~SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33039,12 +35529,13 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminFabricIndexWithParams:params + [cluster subscribeAttributeProductAppearanceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + reportHandler:^( + MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33053,29 +35544,29 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs }; /* - * Attribute AdminVendorId + * Attribute GeneratedCommandList */ -class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { +class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningAdminVendorId() - : ReadAttribute("admin-vendor-id") + ReadBridgedDeviceBasicInformationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadAdministratorCommissioningAdminVendorId() {} + ~ReadBridgedDeviceBasicInformationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning AdminVendorId read Error", error); + LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -33083,22 +35574,22 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminVendorId() - : SubscribeAttribute("admin-vendor-id") + SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAdministratorCommissioningAdminVendorId() {} + ~SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33109,12 +35600,12 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminVendorIdWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33123,29 +35614,29 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBridgedDeviceBasicInformationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadAdministratorCommissioningGeneratedCommandList() {} + ~ReadBridgedDeviceBasicInformationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -33153,22 +35644,22 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33179,12 +35670,12 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33193,29 +35684,29 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { public: - ReadAdministratorCommissioningAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBridgedDeviceBasicInformationEventList() + : ReadAttribute("event-list") { } - ~ReadAdministratorCommissioningAcceptedCommandList() {} + ~ReadBridgedDeviceBasicInformationEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -33223,22 +35714,22 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationEventList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBridgedDeviceBasicInformationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33249,12 +35740,12 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33265,27 +35756,27 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S /* * Attribute AttributeList */ -class ReadAdministratorCommissioningAttributeList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { public: - ReadAdministratorCommissioningAttributeList() + ReadBridgedDeviceBasicInformationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAdministratorCommissioningAttributeList() {} + ~ReadBridgedDeviceBasicInformationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning AttributeList read Error", error); + LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -33293,22 +35784,22 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAttributeList() + SubscribeAttributeBridgedDeviceBasicInformationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAdministratorCommissioningAttributeList() {} + ~SubscribeAttributeBridgedDeviceBasicInformationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33324,7 +35815,7 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33335,27 +35826,27 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { +class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { public: - ReadAdministratorCommissioningFeatureMap() + ReadBridgedDeviceBasicInformationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAdministratorCommissioningFeatureMap() {} + ~ReadBridgedDeviceBasicInformationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning FeatureMap read Error", error); + LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -33363,22 +35854,22 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningFeatureMap() + SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAdministratorCommissioningFeatureMap() {} + ~SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33394,7 +35885,7 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33405,27 +35896,27 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { +class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { public: - ReadAdministratorCommissioningClusterRevision() + ReadBridgedDeviceBasicInformationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAdministratorCommissioningClusterRevision() {} + ~ReadBridgedDeviceBasicInformationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("AdministratorCommissioning ClusterRevision read Error", error); + LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -33433,22 +35924,22 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningClusterRevision() + SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAdministratorCommissioningClusterRevision() {} + ~SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000039) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33464,7 +35955,7 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33473,25 +35964,14 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc }; /*----------------------------------------------------------------------------*\ -| Cluster OperationalCredentials | 0x003E | +| Cluster Switch | 0x003B | |------------------------------------------------------------------------------| | Commands: | | -| * AttestationRequest | 0x00 | -| * CertificateChainRequest | 0x02 | -| * CSRRequest | 0x04 | -| * AddNOC | 0x06 | -| * UpdateNOC | 0x07 | -| * UpdateFabricLabel | 0x09 | -| * RemoveFabric | 0x0A | -| * AddTrustedRootCertificate | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * NOCs | 0x0000 | -| * Fabrics | 0x0001 | -| * SupportedFabrics | 0x0002 | -| * CommissionedFabrics | 0x0003 | -| * TrustedRootCertificates | 0x0004 | -| * CurrentFabricIndex | 0x0005 | +| * NumberOfPositions | 0x0000 | +| * CurrentPosition | 0x0001 | +| * MultiPressMax | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -33500,470 +35980,322 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * SwitchLatched | 0x0000 | +| * InitialPress | 0x0001 | +| * LongPress | 0x0002 | +| * ShortRelease | 0x0003 | +| * LongRelease | 0x0004 | +| * MultiPressOngoing | 0x0005 | +| * MultiPressComplete | 0x0006 | \*----------------------------------------------------------------------------*/ /* - * Command AttestationRequest + * Attribute NumberOfPositions */ -class OperationalCredentialsAttestationRequest : public ClusterCommand { +class ReadSwitchNumberOfPositions : public ReadAttribute { public: - OperationalCredentialsAttestationRequest() - : ClusterCommand("attestation-request") + ReadSwitchNumberOfPositions() + : ReadAttribute("number-of-positions") { - AddArgument("AttestationNonce", &mRequest.attestationNonce); - ClusterCommand::AddArguments(); } + ~ReadSwitchNumberOfPositions() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.attestationNonce = [NSData dataWithBytes:mRequest.attestationNonce.data() length:mRequest.attestationNonce.size()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster attestationRequestWithParams:params - completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.NumberOfPositions response %@", [value description]); + if (error != nil) { + LogNSError("Switch NumberOfPositions read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; }; -/* - * Command CertificateChainRequest - */ -class OperationalCredentialsCertificateChainRequest : public ClusterCommand { +class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { public: - OperationalCredentialsCertificateChainRequest() - : ClusterCommand("certificate-chain-request") + SubscribeAttributeSwitchNumberOfPositions() + : SubscribeAttribute("number-of-positions") { - AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeSwitchNumberOfPositions() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.certificateType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.certificateType)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster certificateChainRequestWithParams:params - completion:^( - MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNumberOfPositionsWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.NumberOfPositions response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; }; /* - * Command CSRRequest + * Attribute CurrentPosition */ -class OperationalCredentialsCSRRequest : public ClusterCommand { +class ReadSwitchCurrentPosition : public ReadAttribute { public: - OperationalCredentialsCSRRequest() - : ClusterCommand("csrrequest") + ReadSwitchCurrentPosition() + : ReadAttribute("current-position") { - AddArgument("CSRNonce", &mRequest.CSRNonce); - AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); - ClusterCommand::AddArguments(); } + ~ReadSwitchCurrentPosition() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.csrNonce = [NSData dataWithBytes:mRequest.CSRNonce.data() length:mRequest.CSRNonce.size()]; - if (mRequest.isForUpdateNOC.HasValue()) { - params.isForUpdateNOC = [NSNumber numberWithBool:mRequest.isForUpdateNOC.Value()]; - } else { - params.isForUpdateNOC = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster CSRRequestWithParams:params - completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.CurrentPosition response %@", [value description]); + if (error != nil) { + LogNSError("Switch CurrentPosition read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; }; -/* - * Command AddNOC - */ -class OperationalCredentialsAddNOC : public ClusterCommand { +class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { public: - OperationalCredentialsAddNOC() - : ClusterCommand("add-noc") + SubscribeAttributeSwitchCurrentPosition() + : SubscribeAttribute("current-position") { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - AddArgument("IPKValue", &mRequest.IPKValue); - AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); - AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeSwitchCurrentPosition() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; - if (mRequest.ICACValue.HasValue()) { - params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; - } else { - params.icacValue = nil; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - params.ipkValue = [NSData dataWithBytes:mRequest.IPKValue.data() length:mRequest.IPKValue.size()]; - params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:mRequest.caseAdminSubject]; - params.adminVendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.adminVendorId)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addNOCWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeCurrentPositionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.CurrentPosition response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; }; /* - * Command UpdateNOC + * Attribute MultiPressMax */ -class OperationalCredentialsUpdateNOC : public ClusterCommand { +class ReadSwitchMultiPressMax : public ReadAttribute { public: - OperationalCredentialsUpdateNOC() - : ClusterCommand("update-noc") + ReadSwitchMultiPressMax() + : ReadAttribute("multi-press-max") { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); - ClusterCommand::AddArguments(); } + ~ReadSwitchMultiPressMax() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; - if (mRequest.ICACValue.HasValue()) { - params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; - } else { - params.icacValue = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster updateNOCWithParams:params - completion:^( - MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMultiPressMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.MultiPressMax response %@", [value description]); + if (error != nil) { + LogNSError("Switch MultiPressMax read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; -/* - * Command UpdateFabricLabel - */ -class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { +class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { public: - OperationalCredentialsUpdateFabricLabel() - : ClusterCommand("update-fabric-label") + SubscribeAttributeSwitchMultiPressMax() + : SubscribeAttribute("multi-press-max") { - AddArgument("Label", &mRequest.label); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeSwitchMultiPressMax() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.label = [[NSString alloc] initWithBytes:mRequest.label.data() - length:mRequest.label.size() - encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster updateFabricLabelWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMultiPressMaxWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.MultiPressMax response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; }; /* - * Command RemoveFabric + * Attribute GeneratedCommandList */ -class OperationalCredentialsRemoveFabric : public ClusterCommand { +class ReadSwitchGeneratedCommandList : public ReadAttribute { public: - OperationalCredentialsRemoveFabric() - : ClusterCommand("remove-fabric") + ReadSwitchGeneratedCommandList() + : ReadAttribute("generated-command-list") { - AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); - ClusterCommand::AddArguments(); } + ~ReadSwitchGeneratedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.fabricIndex = [NSNumber numberWithUnsignedChar:mRequest.fabricIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeFabricWithParams:params - completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("Switch GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; }; -/* - * Command AddTrustedRootCertificate - */ -class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { +class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { public: - OperationalCredentialsAddTrustedRootCertificate() - : ClusterCommand("add-trusted-root-certificate") + SubscribeAttributeSwitchGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { - AddArgument("RootCACertificate", &mRequest.rootCACertificate); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeSwitchGeneratedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rootCACertificate = [NSData dataWithBytes:mRequest.rootCACertificate.data() - length:mRequest.rootCACertificate.size()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addTrustedRootCertificateWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; }; /* - * Attribute NOCs + * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsNOCs : public ReadAttribute { +class ReadSwitchAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsNOCs() - : ReadAttribute("nocs") + ReadSwitchAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsNOCs() {} + ~ReadSwitchAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeNOCsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials NOCs read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("Switch AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { +class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsNOCs() - : SubscribeAttribute("nocs") + SubscribeAttributeSwitchAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsNOCs() {} + ~SubscribeAttributeSwitchAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33974,12 +36306,12 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNOCsWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + NSLog(@"Switch.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -33988,57 +36320,48 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { }; /* - * Attribute Fabrics + * Attribute EventList */ -class ReadOperationalCredentialsFabrics : public ReadAttribute { +class ReadSwitchEventList : public ReadAttribute { public: - ReadOperationalCredentialsFabrics() - : ReadAttribute("fabrics") + ReadSwitchEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalCredentialsFabrics() {} + ~ReadSwitchEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeFabricsWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); - if (error != nil) { - LogNSError("OperationalCredentials Fabrics read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Switch EventList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { +class SubscribeAttributeSwitchEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFabrics() - : SubscribeAttribute("fabrics") + SubscribeAttributeSwitchEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalCredentialsFabrics() {} + ~SubscribeAttributeSwitchEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34049,12 +36372,12 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFabricsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + NSLog(@"Switch.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34063,29 +36386,27 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut }; /* - * Attribute SupportedFabrics + * Attribute AttributeList */ -class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { +class ReadSwitchAttributeList : public ReadAttribute { public: - ReadOperationalCredentialsSupportedFabrics() - : ReadAttribute("supported-fabrics") + ReadSwitchAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalCredentialsSupportedFabrics() {} + ~ReadSwitchAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials SupportedFabrics read Error", error); + LogNSError("Switch AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -34093,22 +36414,20 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { +class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsSupportedFabrics() - : SubscribeAttribute("supported-fabrics") + SubscribeAttributeSwitchAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalCredentialsSupportedFabrics() {} + ~SubscribeAttributeSwitchAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34119,12 +36438,12 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedFabricsWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34133,29 +36452,27 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib }; /* - * Attribute CommissionedFabrics + * Attribute FeatureMap */ -class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { +class ReadSwitchFeatureMap : public ReadAttribute { public: - ReadOperationalCredentialsCommissionedFabrics() - : ReadAttribute("commissioned-fabrics") + ReadSwitchFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalCredentialsCommissionedFabrics() {} + ~ReadSwitchFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials CommissionedFabrics read Error", error); + LogNSError("Switch FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -34163,22 +36480,20 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { +class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCommissionedFabrics() - : SubscribeAttribute("commissioned-fabrics") + SubscribeAttributeSwitchFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() {} + ~SubscribeAttributeSwitchFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34189,12 +36504,12 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCommissionedFabricsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); + NSLog(@"Switch.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34203,29 +36518,27 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc }; /* - * Attribute TrustedRootCertificates + * Attribute ClusterRevision */ -class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { +class ReadSwitchClusterRevision : public ReadAttribute { public: - ReadOperationalCredentialsTrustedRootCertificates() - : ReadAttribute("trusted-root-certificates") + ReadSwitchClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalCredentialsTrustedRootCertificates() {} + ~ReadSwitchClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); + LogNSError("Switch ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -34233,22 +36546,20 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { +class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsTrustedRootCertificates() - : SubscribeAttribute("trusted-root-certificates") + SubscribeAttributeSwitchClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() {} + ~SubscribeAttributeSwitchClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34259,12 +36570,12 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTrustedRootCertificatesWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34272,30 +36583,196 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S } }; +/*----------------------------------------------------------------------------*\ +| Cluster AdministratorCommissioning | 0x003C | +|------------------------------------------------------------------------------| +| Commands: | | +| * OpenCommissioningWindow | 0x00 | +| * OpenBasicCommissioningWindow | 0x01 | +| * RevokeCommissioning | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * WindowStatus | 0x0000 | +| * AdminFabricIndex | 0x0001 | +| * AdminVendorId | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute CurrentFabricIndex + * Command OpenCommissioningWindow */ -class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { +class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { public: - ReadOperationalCredentialsCurrentFabricIndex() - : ReadAttribute("current-fabric-index") + AdministratorCommissioningOpenCommissioningWindow() + : ClusterCommand("open-commissioning-window") + { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + AddArgument("PAKEPasscodeVerifier", &mRequest.PAKEPasscodeVerifier); + AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); + AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); + AddArgument("Salt", &mRequest.salt); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; + params.pakePasscodeVerifier = [NSData dataWithBytes:mRequest.PAKEPasscodeVerifier.data() + length:mRequest.PAKEPasscodeVerifier.size()]; + params.discriminator = [NSNumber numberWithUnsignedShort:mRequest.discriminator]; + params.iterations = [NSNumber numberWithUnsignedInt:mRequest.iterations]; + params.salt = [NSData dataWithBytes:mRequest.salt.data() length:mRequest.salt.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openCommissioningWindowWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; } - ~ReadOperationalCredentialsCurrentFabricIndex() {} +private: + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; +}; + +/* + * Command OpenBasicCommissioningWindow + */ +class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand { +public: + AdministratorCommissioningOpenBasicCommissioningWindow() + : ClusterCommand("open-basic-commissioning-window") + { + AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + ClusterCommand::AddArguments(); + } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.commissioningTimeout = [NSNumber numberWithUnsignedShort:mRequest.commissioningTimeout]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster openBasicCommissioningWindowWithParams:params + completion:^(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::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; +}; + +/* + * Command RevokeCommissioning + */ +class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { +public: + AdministratorCommissioningRevokeCommissioning() + : ClusterCommand("revoke-commissioning") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster revokeCommissioningWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute WindowStatus + */ +class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { +public: + ReadAdministratorCommissioningWindowStatus() + : ReadAttribute("window-status") + { + } + + ~ReadAdministratorCommissioningWindowStatus() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeWindowStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); + LogNSError("AdministratorCommissioning WindowStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -34303,22 +36780,22 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCurrentFabricIndex() - : SubscribeAttribute("current-fabric-index") + SubscribeAttributeAdministratorCommissioningWindowStatus() + : SubscribeAttribute("window-status") { } - ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() {} + ~SubscribeAttributeAdministratorCommissioningWindowStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34329,12 +36806,12 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentFabricIndexWithParams:params + [cluster subscribeAttributeWindowStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34343,29 +36820,29 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr }; /* - * Attribute GeneratedCommandList + * Attribute AdminFabricIndex */ -class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { +class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { public: - ReadOperationalCredentialsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadAdministratorCommissioningAdminFabricIndex() + : ReadAttribute("admin-fabric-index") { } - ~ReadOperationalCredentialsGeneratedCommandList() {} + ~ReadAdministratorCommissioningAdminFabricIndex() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAdminFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials GeneratedCommandList read Error", error); + LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); } SetCommandExitStatus(error); }]; @@ -34373,22 +36850,22 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeAdministratorCommissioningAdminFabricIndex() + : SubscribeAttribute("admin-fabric-index") { } - ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() {} + ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34399,12 +36876,12 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAdminFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34413,29 +36890,29 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs }; /* - * Attribute AcceptedCommandList + * Attribute AdminVendorId */ -class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { +class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { public: - ReadOperationalCredentialsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadAdministratorCommissioningAdminVendorId() + : ReadAttribute("admin-vendor-id") { } - ~ReadOperationalCredentialsAcceptedCommandList() {} + ~ReadAdministratorCommissioningAdminVendorId() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAdminVendorIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials AcceptedCommandList read Error", error); + LogNSError("AdministratorCommissioning AdminVendorId read Error", error); } SetCommandExitStatus(error); }]; @@ -34443,22 +36920,22 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeAdministratorCommissioningAdminVendorId() + : SubscribeAttribute("admin-vendor-id") { } - ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() {} + ~SubscribeAttributeAdministratorCommissioningAdminVendorId() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34469,12 +36946,12 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAdminVendorIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34483,29 +36960,29 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc }; /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadOperationalCredentialsAttributeList : public ReadAttribute { +class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsAttributeList() - : ReadAttribute("attribute-list") + ReadAdministratorCommissioningGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOperationalCredentialsAttributeList() {} + ~ReadAdministratorCommissioningGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials AttributeList read Error", error); + LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -34513,22 +36990,22 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalCredentialsAttributeList() {} + ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34539,12 +37016,12 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34553,29 +37030,29 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsFeatureMap : public ReadAttribute { +class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsFeatureMap() - : ReadAttribute("feature-map") + ReadAdministratorCommissioningAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsFeatureMap() {} + ~ReadAdministratorCommissioningAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials FeatureMap read Error", error); + LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -34583,22 +37060,22 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsFeatureMap() {} + ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34609,12 +37086,12 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34623,29 +37100,29 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadOperationalCredentialsClusterRevision : public ReadAttribute { +class ReadAdministratorCommissioningEventList : public ReadAttribute { public: - ReadOperationalCredentialsClusterRevision() - : ReadAttribute("cluster-revision") + ReadAdministratorCommissioningEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalCredentialsClusterRevision() {} + ~ReadAdministratorCommissioningEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); if (error != nil) { - LogNSError("OperationalCredentials ClusterRevision read Error", error); + LogNSError("AdministratorCommissioning EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -34653,22 +37130,22 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeAdministratorCommissioningEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalCredentialsClusterRevision() {} + ~SubscribeAttributeAdministratorCommissioningEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34679,12 +37156,12 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -34692,375 +37169,123 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster GroupKeyManagement | 0x003F | -|------------------------------------------------------------------------------| -| Commands: | | -| * KeySetWrite | 0x00 | -| * KeySetRead | 0x01 | -| * KeySetRemove | 0x03 | -| * KeySetReadAllIndices | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GroupKeyMap | 0x0000 | -| * GroupTable | 0x0001 | -| * MaxGroupsPerFabric | 0x0002 | -| * MaxGroupKeysPerFabric | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command KeySetWrite + * Attribute AttributeList */ -class GroupKeyManagementKeySetWrite : public ClusterCommand { +class ReadAdministratorCommissioningAttributeList : public ReadAttribute { public: - GroupKeyManagementKeySetWrite() - : ClusterCommand("key-set-write") - , mComplex_GroupKeySet(&mRequest.groupKeySet) - { - AddArgument("GroupKeySet", &mComplex_GroupKeySet); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadAdministratorCommissioningAttributeList() + : ReadAttribute("attribute-list") { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; - params.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySet.groupKeySetID]; - params.groupKeySet.groupKeySecurityPolicy = - [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.groupKeySet.groupKeySecurityPolicy)]; - if (mRequest.groupKeySet.epochKey0.IsNull()) { - params.groupKeySet.epochKey0 = nil; - } else { - params.groupKeySet.epochKey0 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey0.Value().data() - length:mRequest.groupKeySet.epochKey0.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime0.IsNull()) { - params.groupKeySet.epochStartTime0 = nil; - } else { - params.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime0.Value()]; - } - if (mRequest.groupKeySet.epochKey1.IsNull()) { - params.groupKeySet.epochKey1 = nil; - } else { - params.groupKeySet.epochKey1 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey1.Value().data() - length:mRequest.groupKeySet.epochKey1.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime1.IsNull()) { - params.groupKeySet.epochStartTime1 = nil; - } else { - params.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime1.Value()]; - } - if (mRequest.groupKeySet.epochKey2.IsNull()) { - params.groupKeySet.epochKey2 = nil; - } else { - params.groupKeySet.epochKey2 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey2.Value().data() - length:mRequest.groupKeySet.epochKey2.Value().size()]; - } - if (mRequest.groupKeySet.epochStartTime2.IsNull()) { - params.groupKeySet.epochStartTime2 = nil; - } else { - params.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime2.Value()]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetWriteWithParams:params - completion:^(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::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; - TypedComplexArgument mComplex_GroupKeySet; -}; - -/* - * Command KeySetRead - */ -class GroupKeyManagementKeySetRead : public ClusterCommand { -public: - GroupKeyManagementKeySetRead() - : ClusterCommand("key-set-read") - { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); - } + ~ReadAdministratorCommissioningAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetReadWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("AdministratorCommissioning AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; -/* - * Command KeySetRemove - */ -class GroupKeyManagementKeySetRemove : public ClusterCommand { +class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { public: - GroupKeyManagementKeySetRemove() - : ClusterCommand("key-set-remove") - { - AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeAdministratorCommissioningAttributeList() + : SubscribeAttribute("attribute-list") { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster keySetRemoveWithParams:params - completion:^(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::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; -}; - -/* - * Command KeySetReadAllIndices - */ -class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { -public: - GroupKeyManagementKeySetReadAllIndices() - : ClusterCommand("key-set-read-all-indices") - , mComplex_GroupKeySetIDs(&mRequest.groupKeySetIDs) - { - AddArgument("GroupKeySetIDs", &mComplex_GroupKeySetIDs); - ClusterCommand::AddArguments(); - } + ~SubscribeAttributeAdministratorCommissioningAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.groupKeySetIDs) { - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; - [array_0 addObject:newElement_0]; - } - params.groupKeySetIDs = array_0; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster - keySetReadAllIndicesWithParams:params - completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; - TypedComplexArgument> mComplex_GroupKeySetIDs; }; /* - * Attribute GroupKeyMap + * Attribute FeatureMap */ -class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { +class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { public: - ReadGroupKeyManagementGroupKeyMap() - : ReadAttribute("group-key-map") + ReadAdministratorCommissioningFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadGroupKeyManagementGroupKeyMap() {} + ~ReadAdministratorCommissioningFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeGroupKeyMapWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { -public: - WriteGroupKeyManagementGroupKeyMap() - : WriteAttribute("group-key-map") - , mComplex(&mValue) - { - AddArgument("attr-name", "group-key-map"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteGroupKeyManagementGroupKeyMap() {} + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; - newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; - newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; - newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("AdministratorCommissioning FeatureMap read Error", error); } - value = array_0; - } - - [cluster writeAttributeGroupKeyMapWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GroupKeyManagement GroupKeyMap write Error", error); - } - SetCommandExitStatus(error); - }]; + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex; }; -class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGroupKeyMap() - : SubscribeAttribute("group-key-map") + SubscribeAttributeAdministratorCommissioningFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeGroupKeyManagementGroupKeyMap() {} + ~SubscribeAttributeAdministratorCommissioningFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35071,12 +37296,12 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGroupKeyMapWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35085,57 +37310,52 @@ class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribut }; /* - * Attribute GroupTable + * Attribute ClusterRevision */ -class ReadGroupKeyManagementGroupTable : public ReadAttribute { +class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { public: - ReadGroupKeyManagementGroupTable() - : ReadAttribute("group-table") + ReadAdministratorCommissioningClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadGroupKeyManagementGroupTable() {} + ~ReadAdministratorCommissioningClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeGroupTableWithParams:params - completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement GroupTable read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("AdministratorCommissioning ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGroupTable() - : SubscribeAttribute("group-table") + SubscribeAttributeAdministratorCommissioningClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeGroupKeyManagementGroupTable() {} + ~SubscribeAttributeAdministratorCommissioningClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35146,346 +37366,511 @@ class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGroupTableWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); - SetCommandExitStatus(error); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } }; +/*----------------------------------------------------------------------------*\ +| Cluster OperationalCredentials | 0x003E | +|------------------------------------------------------------------------------| +| Commands: | | +| * AttestationRequest | 0x00 | +| * CertificateChainRequest | 0x02 | +| * CSRRequest | 0x04 | +| * AddNOC | 0x06 | +| * UpdateNOC | 0x07 | +| * UpdateFabricLabel | 0x09 | +| * RemoveFabric | 0x0A | +| * AddTrustedRootCertificate | 0x0B | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NOCs | 0x0000 | +| * Fabrics | 0x0001 | +| * SupportedFabrics | 0x0002 | +| * CommissionedFabrics | 0x0003 | +| * TrustedRootCertificates | 0x0004 | +| * CurrentFabricIndex | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MaxGroupsPerFabric + * Command AttestationRequest */ -class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { +class OperationalCredentialsAttestationRequest : public ClusterCommand { public: - ReadGroupKeyManagementMaxGroupsPerFabric() - : ReadAttribute("max-groups-per-fabric") + OperationalCredentialsAttestationRequest() + : ClusterCommand("attestation-request") { + AddArgument("AttestationNonce", &mRequest.attestationNonce); + ClusterCommand::AddArguments(); } - ~ReadGroupKeyManagementMaxGroupsPerFabric() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { -public: - SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() - : SubscribeAttribute("max-groups-per-fabric") - { - } - - ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() {} + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.attestationNonce = [NSData dataWithBytes:mRequest.attestationNonce.data() length:mRequest.attestationNonce.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster attestationRequestWithParams:params + completion:^(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; }; /* - * Attribute MaxGroupKeysPerFabric + * Command CertificateChainRequest */ -class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { +class OperationalCredentialsCertificateChainRequest : public ClusterCommand { public: - ReadGroupKeyManagementMaxGroupKeysPerFabric() - : ReadAttribute("max-group-keys-per-fabric") + OperationalCredentialsCertificateChainRequest() + : ClusterCommand("certificate-chain-request") { + AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); + ClusterCommand::AddArguments(); } - ~ReadGroupKeyManagementMaxGroupKeysPerFabric() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.certificateType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.certificateType)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster certificateChainRequestWithParams:params + completion:^( + MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; }; -class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { +/* + * Command CSRRequest + */ +class OperationalCredentialsCSRRequest : public ClusterCommand { public: - SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() - : SubscribeAttribute("max-group-keys-per-fabric") + OperationalCredentialsCSRRequest() + : ClusterCommand("csrrequest") { + AddArgument("CSRNonce", &mRequest.CSRNonce); + AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.csrNonce = [NSData dataWithBytes:mRequest.CSRNonce.data() length:mRequest.CSRNonce.size()]; + if (mRequest.isForUpdateNOC.HasValue()) { + params.isForUpdateNOC = [NSNumber numberWithBool:mRequest.isForUpdateNOC.Value()]; + } else { + params.isForUpdateNOC = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster CSRRequestWithParams:params + completion:^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Command AddNOC */ -class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { +class OperationalCredentialsAddNOC : public ClusterCommand { public: - ReadGroupKeyManagementGeneratedCommandList() - : ReadAttribute("generated-command-list") + OperationalCredentialsAddNOC() + : ClusterCommand("add-noc") { + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + AddArgument("IPKValue", &mRequest.IPKValue); + AddArgument("CaseAdminSubject", 0, UINT64_MAX, &mRequest.caseAdminSubject); + AddArgument("AdminVendorId", 0, UINT16_MAX, &mRequest.adminVendorId); + ClusterCommand::AddArguments(); } - ~ReadGroupKeyManagementGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; + if (mRequest.ICACValue.HasValue()) { + params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; + } else { + params.icacValue = nil; + } + params.ipkValue = [NSData dataWithBytes:mRequest.IPKValue.data() length:mRequest.IPKValue.size()]; + params.caseAdminSubject = [NSNumber numberWithUnsignedLongLong:mRequest.caseAdminSubject]; + params.adminVendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.adminVendorId)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addNOCWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; }; -class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { +/* + * Command UpdateNOC + */ +class OperationalCredentialsUpdateNOC : public ClusterCommand { public: - SubscribeAttributeGroupKeyManagementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + OperationalCredentialsUpdateNOC() + : ClusterCommand("update-noc") { + AddArgument("NOCValue", &mRequest.NOCValue); + AddArgument("ICACValue", &mRequest.ICACValue); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.nocValue = [NSData dataWithBytes:mRequest.NOCValue.data() length:mRequest.NOCValue.size()]; + if (mRequest.ICACValue.HasValue()) { + params.icacValue = [NSData dataWithBytes:mRequest.ICACValue.Value().data() length:mRequest.ICACValue.Value().size()]; + } else { + params.icacValue = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updateNOCWithParams:params + completion:^( + MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; /* - * Attribute AcceptedCommandList + * Command UpdateFabricLabel */ -class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { +class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { public: - ReadGroupKeyManagementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + OperationalCredentialsUpdateFabricLabel() + : ClusterCommand("update-fabric-label") { + AddArgument("Label", &mRequest.label); + ClusterCommand::AddArguments(); } - ~ReadGroupKeyManagementAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.label = [[NSString alloc] initWithBytes:mRequest.label.data() + length:mRequest.label.size() + encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster updateFabricLabelWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; }; -class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { +/* + * Command RemoveFabric + */ +class OperationalCredentialsRemoveFabric : public ClusterCommand { public: - SubscribeAttributeGroupKeyManagementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + OperationalCredentialsRemoveFabric() + : ClusterCommand("remove-fabric") { + AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.fabricIndex = [NSNumber numberWithUnsignedChar:mRequest.fabricIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeFabricWithParams:params + completion:^(MTROperationalCredentialsClusterNOCResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; }; /* - * Attribute AttributeList + * Command AddTrustedRootCertificate */ -class ReadGroupKeyManagementAttributeList : public ReadAttribute { +class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { public: - ReadGroupKeyManagementAttributeList() - : ReadAttribute("attribute-list") + OperationalCredentialsAddTrustedRootCertificate() + : ClusterCommand("add-trusted-root-certificate") { + AddArgument("RootCACertificate", &mRequest.rootCACertificate); + ClusterCommand::AddArguments(); } - ~ReadGroupKeyManagementAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.rootCACertificate = [NSData dataWithBytes:mRequest.rootCACertificate.data() + length:mRequest.rootCACertificate.size()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addTrustedRootCertificateWithParams:params + completion:^(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::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; }; -class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { +/* + * Attribute NOCs + */ +class ReadOperationalCredentialsNOCs : public ReadAttribute { public: - SubscribeAttributeGroupKeyManagementAttributeList() - : SubscribeAttribute("attribute-list") + ReadOperationalCredentialsNOCs() + : ReadAttribute("nocs") { } - ~SubscribeAttributeGroupKeyManagementAttributeList() {} + ~ReadOperationalCredentialsNOCs() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeNOCsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); + if (error != nil) { + LogNSError("OperationalCredentials NOCs read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { +public: + SubscribeAttributeOperationalCredentialsNOCs() + : SubscribeAttribute("nocs") + { + } + + ~SubscribeAttributeOperationalCredentialsNOCs() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35496,12 +37881,12 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeNOCsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35510,52 +37895,57 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib }; /* - * Attribute FeatureMap + * Attribute Fabrics */ -class ReadGroupKeyManagementFeatureMap : public ReadAttribute { +class ReadOperationalCredentialsFabrics : public ReadAttribute { public: - ReadGroupKeyManagementFeatureMap() - : ReadAttribute("feature-map") + ReadOperationalCredentialsFabrics() + : ReadAttribute("fabrics") { } - ~ReadGroupKeyManagementFeatureMap() {} + ~ReadOperationalCredentialsFabrics() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("GroupKeyManagement FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeFabricsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); + if (error != nil) { + LogNSError("OperationalCredentials Fabrics read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOperationalCredentialsFabrics() + : SubscribeAttribute("fabrics") { } - ~SubscribeAttributeGroupKeyManagementFeatureMap() {} + ~SubscribeAttributeOperationalCredentialsFabrics() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35566,12 +37956,12 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35580,29 +37970,29 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute }; /* - * Attribute ClusterRevision + * Attribute SupportedFabrics */ -class ReadGroupKeyManagementClusterRevision : public ReadAttribute { +class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { public: - ReadGroupKeyManagementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalCredentialsSupportedFabrics() + : ReadAttribute("supported-fabrics") { } - ~ReadGroupKeyManagementClusterRevision() {} + ~ReadOperationalCredentialsSupportedFabrics() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSupportedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); if (error != nil) { - LogNSError("GroupKeyManagement ClusterRevision read Error", error); + LogNSError("OperationalCredentials SupportedFabrics read Error", error); } SetCommandExitStatus(error); }]; @@ -35610,22 +38000,22 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalCredentialsSupportedFabrics() + : SubscribeAttribute("supported-fabrics") { } - ~SubscribeAttributeGroupKeyManagementClusterRevision() {} + ~SubscribeAttributeOperationalCredentialsSupportedFabrics() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35636,12 +38026,12 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeSupportedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35649,47 +38039,30 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr } }; -/*----------------------------------------------------------------------------*\ -| Cluster FixedLabel | 0x0040 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LabelList | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute LabelList + * Attribute CommissionedFabrics */ -class ReadFixedLabelLabelList : public ReadAttribute { +class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { public: - ReadFixedLabelLabelList() - : ReadAttribute("label-list") + ReadOperationalCredentialsCommissionedFabrics() + : ReadAttribute("commissioned-fabrics") { } - ~ReadFixedLabelLabelList() {} + ~ReadOperationalCredentialsCommissionedFabrics() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.LabelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCommissionedFabricsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); if (error != nil) { - LogNSError("FixedLabel LabelList read Error", error); + LogNSError("OperationalCredentials CommissionedFabrics read Error", error); } SetCommandExitStatus(error); }]; @@ -35697,22 +38070,22 @@ class ReadFixedLabelLabelList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelLabelList() - : SubscribeAttribute("label-list") + SubscribeAttributeOperationalCredentialsCommissionedFabrics() + : SubscribeAttribute("commissioned-fabrics") { } - ~SubscribeAttributeFixedLabelLabelList() {} + ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35723,12 +38096,12 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLabelListWithParams:params + [cluster subscribeAttributeCommissionedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.LabelList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35737,29 +38110,29 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute TrustedRootCertificates */ -class ReadFixedLabelGeneratedCommandList : public ReadAttribute { +class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { public: - ReadFixedLabelGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOperationalCredentialsTrustedRootCertificates() + : ReadAttribute("trusted-root-certificates") { } - ~ReadFixedLabelGeneratedCommandList() {} + ~ReadOperationalCredentialsTrustedRootCertificates() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTrustedRootCertificatesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); if (error != nil) { - LogNSError("FixedLabel GeneratedCommandList read Error", error); + LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); } SetCommandExitStatus(error); }]; @@ -35767,22 +38140,22 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOperationalCredentialsTrustedRootCertificates() + : SubscribeAttribute("trusted-root-certificates") { } - ~SubscribeAttributeFixedLabelGeneratedCommandList() {} + ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35793,12 +38166,12 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeTrustedRootCertificatesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.TrustedRootCertificates response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35807,29 +38180,29 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu }; /* - * Attribute AcceptedCommandList + * Attribute CurrentFabricIndex */ -class ReadFixedLabelAcceptedCommandList : public ReadAttribute { +class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { public: - ReadFixedLabelAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOperationalCredentialsCurrentFabricIndex() + : ReadAttribute("current-fabric-index") { } - ~ReadFixedLabelAcceptedCommandList() {} + ~ReadOperationalCredentialsCurrentFabricIndex() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentFabricIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error != nil) { - LogNSError("FixedLabel AcceptedCommandList read Error", error); + LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); } SetCommandExitStatus(error); }]; @@ -35837,22 +38210,22 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOperationalCredentialsCurrentFabricIndex() + : SubscribeAttribute("current-fabric-index") { } - ~SubscribeAttributeFixedLabelAcceptedCommandList() {} + ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35863,12 +38236,12 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35877,29 +38250,29 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut }; /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadFixedLabelAttributeList : public ReadAttribute { +class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { public: - ReadFixedLabelAttributeList() - : ReadAttribute("attribute-list") + ReadOperationalCredentialsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadFixedLabelAttributeList() {} + ~ReadOperationalCredentialsGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("FixedLabel AttributeList read Error", error); + LogNSError("OperationalCredentials GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -35907,22 +38280,22 @@ class ReadFixedLabelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOperationalCredentialsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFixedLabelAttributeList() {} + ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35933,12 +38306,12 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -35947,29 +38320,29 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadFixedLabelFeatureMap : public ReadAttribute { +class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { public: - ReadFixedLabelFeatureMap() - : ReadAttribute("feature-map") + ReadOperationalCredentialsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadFixedLabelFeatureMap() {} + ~ReadOperationalCredentialsAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("FixedLabel FeatureMap read Error", error); + LogNSError("OperationalCredentials AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -35977,22 +38350,22 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOperationalCredentialsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFixedLabelFeatureMap() {} + ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36003,12 +38376,12 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36017,29 +38390,29 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadFixedLabelClusterRevision : public ReadAttribute { +class ReadOperationalCredentialsEventList : public ReadAttribute { public: - ReadFixedLabelClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalCredentialsEventList() + : ReadAttribute("event-list") { } - ~ReadFixedLabelClusterRevision() {} + ~ReadOperationalCredentialsEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.EventList response %@", [value description]); if (error != nil) { - LogNSError("FixedLabel ClusterRevision read Error", error); + LogNSError("OperationalCredentials EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -36047,22 +38420,22 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalCredentialsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeFixedLabelClusterRevision() {} + ~SubscribeAttributeOperationalCredentialsEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36073,12 +38446,12 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36086,47 +38459,30 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster UserLabel | 0x0041 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LabelList | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute LabelList + * Attribute AttributeList */ -class ReadUserLabelLabelList : public ReadAttribute { +class ReadOperationalCredentialsAttributeList : public ReadAttribute { public: - ReadUserLabelLabelList() - : ReadAttribute("label-list") + ReadOperationalCredentialsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadUserLabelLabelList() {} + ~ReadOperationalCredentialsAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.LabelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("UserLabel LabelList read Error", error); + LogNSError("OperationalCredentials AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -36134,79 +38490,22 @@ class ReadUserLabelLabelList : public ReadAttribute { } }; -class WriteUserLabelLabelList : public WriteAttribute { +class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { public: - WriteUserLabelLabelList() - : WriteAttribute("label-list") - , mComplex(&mValue) + SubscribeAttributeOperationalCredentialsAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("attr-name", "label-list"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); } - ~WriteUserLabelLabelList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) WriteAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSArray * _Nonnull value; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mValue) { - MTRUserLabelClusterLabelStruct * newElement_0; - newElement_0 = [MTRUserLabelClusterLabelStruct new]; - newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() - length:entry_0.label.size() - encoding:NSUTF8StringEncoding]; - newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() - length:entry_0.value.size() - encoding:NSUTF8StringEncoding]; - [array_0 addObject:newElement_0]; - } - value = array_0; - } - - [cluster writeAttributeLabelListWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UserLabel LabelList write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; -}; - -class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { -public: - SubscribeAttributeUserLabelLabelList() - : SubscribeAttribute("label-list") - { - } - - ~SubscribeAttributeUserLabelLabelList() {} + ~SubscribeAttributeOperationalCredentialsAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36217,12 +38516,12 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLabelListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.LabelList response %@", [value description]); + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36231,29 +38530,29 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadUserLabelGeneratedCommandList : public ReadAttribute { +class ReadOperationalCredentialsFeatureMap : public ReadAttribute { public: - ReadUserLabelGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOperationalCredentialsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadUserLabelGeneratedCommandList() {} + ~ReadOperationalCredentialsFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("UserLabel GeneratedCommandList read Error", error); + LogNSError("OperationalCredentials FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -36261,22 +38560,22 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeUserLabelGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOperationalCredentialsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeUserLabelGeneratedCommandList() {} + ~SubscribeAttributeOperationalCredentialsFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36287,12 +38586,12 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36301,29 +38600,29 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadUserLabelAcceptedCommandList : public ReadAttribute { +class ReadOperationalCredentialsClusterRevision : public ReadAttribute { public: - ReadUserLabelAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOperationalCredentialsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadUserLabelAcceptedCommandList() {} + ~ReadOperationalCredentialsClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("UserLabel AcceptedCommandList read Error", error); + LogNSError("OperationalCredentials ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -36331,22 +38630,22 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeUserLabelAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOperationalCredentialsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeUserLabelAcceptedCommandList() {} + ~SubscribeAttributeOperationalCredentialsClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36357,12 +38656,12 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36370,209 +38669,391 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } }; +/*----------------------------------------------------------------------------*\ +| Cluster GroupKeyManagement | 0x003F | +|------------------------------------------------------------------------------| +| Commands: | | +| * KeySetWrite | 0x00 | +| * KeySetRead | 0x01 | +| * KeySetRemove | 0x03 | +| * KeySetReadAllIndices | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GroupKeyMap | 0x0000 | +| * GroupTable | 0x0001 | +| * MaxGroupsPerFabric | 0x0002 | +| * MaxGroupKeysPerFabric | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AttributeList + * Command KeySetWrite */ -class ReadUserLabelAttributeList : public ReadAttribute { +class GroupKeyManagementKeySetWrite : public ClusterCommand { public: - ReadUserLabelAttributeList() - : ReadAttribute("attribute-list") + GroupKeyManagementKeySetWrite() + : ClusterCommand("key-set-write") + , mComplex_GroupKeySet(&mRequest.groupKeySet) { + AddArgument("GroupKeySet", &mComplex_GroupKeySet); + ClusterCommand::AddArguments(); } - ~ReadUserLabelAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("UserLabel AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; + params.groupKeySet.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySet.groupKeySetID]; + params.groupKeySet.groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.groupKeySet.groupKeySecurityPolicy)]; + if (mRequest.groupKeySet.epochKey0.IsNull()) { + params.groupKeySet.epochKey0 = nil; + } else { + params.groupKeySet.epochKey0 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey0.Value().data() + length:mRequest.groupKeySet.epochKey0.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime0.IsNull()) { + params.groupKeySet.epochStartTime0 = nil; + } else { + params.groupKeySet.epochStartTime0 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime0.Value()]; + } + if (mRequest.groupKeySet.epochKey1.IsNull()) { + params.groupKeySet.epochKey1 = nil; + } else { + params.groupKeySet.epochKey1 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey1.Value().data() + length:mRequest.groupKeySet.epochKey1.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime1.IsNull()) { + params.groupKeySet.epochStartTime1 = nil; + } else { + params.groupKeySet.epochStartTime1 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime1.Value()]; + } + if (mRequest.groupKeySet.epochKey2.IsNull()) { + params.groupKeySet.epochKey2 = nil; + } else { + params.groupKeySet.epochKey2 = [NSData dataWithBytes:mRequest.groupKeySet.epochKey2.Value().data() + length:mRequest.groupKeySet.epochKey2.Value().size()]; + } + if (mRequest.groupKeySet.epochStartTime2.IsNull()) { + params.groupKeySet.epochStartTime2 = nil; + } else { + params.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:mRequest.groupKeySet.epochStartTime2.Value()]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster keySetWriteWithParams:params + completion:^(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::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; + TypedComplexArgument mComplex_GroupKeySet; }; -class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { +/* + * Command KeySetRead + */ +class GroupKeyManagementKeySetRead : public ClusterCommand { public: - SubscribeAttributeUserLabelAttributeList() - : SubscribeAttribute("attribute-list") + GroupKeyManagementKeySetRead() + : ClusterCommand("key-set-read") { + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeUserLabelAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster keySetReadWithParams:params + completion:^(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Attribute FeatureMap + * Command KeySetRemove */ -class ReadUserLabelFeatureMap : public ReadAttribute { +class GroupKeyManagementKeySetRemove : public ClusterCommand { public: - ReadUserLabelFeatureMap() - : ReadAttribute("feature-map") + GroupKeyManagementKeySetRemove() + : ClusterCommand("key-set-remove") { + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); + ClusterCommand::AddArguments(); } - ~ReadUserLabelFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("UserLabel FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:mRequest.groupKeySetID]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster keySetRemoveWithParams:params + completion:^(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::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; }; -class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { +/* + * Command KeySetReadAllIndices + */ +class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: - SubscribeAttributeUserLabelFeatureMap() - : SubscribeAttribute("feature-map") + GroupKeyManagementKeySetReadAllIndices() + : ClusterCommand("key-set-read-all-indices") + , mComplex_GroupKeySetIDs(&mRequest.groupKeySetIDs) { + AddArgument("GroupKeySetIDs", &mComplex_GroupKeySetIDs); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeUserLabelFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) command (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.groupKeySetIDs) { + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedShort:entry_0]; + [array_0 addObject:newElement_0]; + } + params.groupKeySetIDs = array_0; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster + keySetReadAllIndicesWithParams:params + completion:^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type mRequest; + TypedComplexArgument> mComplex_GroupKeySetIDs; }; /* - * Attribute ClusterRevision + * Attribute GroupKeyMap */ -class ReadUserLabelClusterRevision : public ReadAttribute { +class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { public: - ReadUserLabelClusterRevision() - : ReadAttribute("cluster-revision") + ReadGroupKeyManagementGroupKeyMap() + : ReadAttribute("group-key-map") { } - ~ReadUserLabelClusterRevision() {} + ~ReadGroupKeyManagementGroupKeyMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("UserLabel ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); + if (error != nil) { + LogNSError("GroupKeyManagement GroupKeyMap read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { +class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { public: - SubscribeAttributeUserLabelClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteGroupKeyManagementGroupKeyMap() + : WriteAttribute("group-key-map") + , mComplex(&mValue) { + AddArgument("attr-name", "group-key-map"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeUserLabelClusterRevision() {} + ~WriteGroupKeyManagementGroupKeyMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRGroupKeyManagementClusterGroupKeyMapStruct * newElement_0; + newElement_0 = [MTRGroupKeyManagementClusterGroupKeyMapStruct new]; + newElement_0.groupId = [NSNumber numberWithUnsignedShort:entry_0.groupId]; + newElement_0.groupKeySetID = [NSNumber numberWithUnsignedShort:entry_0.groupKeySetID]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; + } + + [cluster writeAttributeGroupKeyMapWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GroupKeyManagement GroupKeyMap write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex; +}; + +class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribute { +public: + SubscribeAttributeGroupKeyManagementGroupKeyMap() + : SubscribeAttribute("group-key-map") + { + } + + ~SubscribeAttributeGroupKeyManagementGroupKeyMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { params.filterByFabric = mFabricFiltered.Value(); } if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGroupKeyMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36580,71 +39061,58 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster BooleanState | 0x0045 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * StateValue | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChange | 0x0000 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute StateValue + * Attribute GroupTable */ -class ReadBooleanStateStateValue : public ReadAttribute { +class ReadGroupKeyManagementGroupTable : public ReadAttribute { public: - ReadBooleanStateStateValue() - : ReadAttribute("state-value") + ReadGroupKeyManagementGroupTable() + : ReadAttribute("group-table") { } - ~ReadBooleanStateStateValue() {} + ~ReadGroupKeyManagementGroupTable() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue response %@", [value description]); - if (error != nil) { - LogNSError("BooleanState StateValue read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); + if (error != nil) { + LogNSError("GroupKeyManagement GroupTable read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateStateValue() - : SubscribeAttribute("state-value") + SubscribeAttributeGroupKeyManagementGroupTable() + : SubscribeAttribute("group-table") { } - ~SubscribeAttributeBooleanStateStateValue() {} + ~SubscribeAttributeGroupKeyManagementGroupTable() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36655,12 +39123,12 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateValueWithParams:params + [cluster subscribeAttributeGroupTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36669,29 +39137,29 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute MaxGroupsPerFabric */ -class ReadBooleanStateGeneratedCommandList : public ReadAttribute { +class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { public: - ReadBooleanStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadGroupKeyManagementMaxGroupsPerFabric() + : ReadAttribute("max-groups-per-fabric") { } - ~ReadBooleanStateGeneratedCommandList() {} + ~ReadGroupKeyManagementMaxGroupsPerFabric() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxGroupsPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); if (error != nil) { - LogNSError("BooleanState GeneratedCommandList read Error", error); + LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); } SetCommandExitStatus(error); }]; @@ -36699,22 +39167,22 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + : SubscribeAttribute("max-groups-per-fabric") { } - ~SubscribeAttributeBooleanStateGeneratedCommandList() {} + ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36725,12 +39193,12 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36739,29 +39207,29 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri }; /* - * Attribute AcceptedCommandList + * Attribute MaxGroupKeysPerFabric */ -class ReadBooleanStateAcceptedCommandList : public ReadAttribute { +class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { public: - ReadBooleanStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadGroupKeyManagementMaxGroupKeysPerFabric() + : ReadAttribute("max-group-keys-per-fabric") { } - ~ReadBooleanStateAcceptedCommandList() {} + ~ReadGroupKeyManagementMaxGroupKeysPerFabric() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxGroupKeysPerFabricWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); if (error != nil) { - LogNSError("BooleanState AcceptedCommandList read Error", error); + LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); } SetCommandExitStatus(error); }]; @@ -36769,22 +39237,22 @@ class ReadBooleanStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + : SubscribeAttribute("max-group-keys-per-fabric") { } - ~SubscribeAttributeBooleanStateAcceptedCommandList() {} + ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36795,12 +39263,12 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36809,29 +39277,29 @@ class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttrib }; /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadBooleanStateAttributeList : public ReadAttribute { +class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { public: - ReadBooleanStateAttributeList() - : ReadAttribute("attribute-list") + ReadGroupKeyManagementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBooleanStateAttributeList() {} + ~ReadGroupKeyManagementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BooleanState AttributeList read Error", error); + LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -36839,22 +39307,22 @@ class ReadBooleanStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeGroupKeyManagementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBooleanStateAttributeList() {} + ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36865,12 +39333,12 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AttributeList response %@", [value description]); + NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36879,29 +39347,29 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadBooleanStateFeatureMap : public ReadAttribute { +class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { public: - ReadBooleanStateFeatureMap() - : ReadAttribute("feature-map") + ReadGroupKeyManagementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBooleanStateFeatureMap() {} + ~ReadGroupKeyManagementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BooleanState FeatureMap read Error", error); + LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -36909,22 +39377,22 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeGroupKeyManagementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBooleanStateFeatureMap() {} + ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36935,12 +39403,12 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -36949,29 +39417,29 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadBooleanStateClusterRevision : public ReadAttribute { +class ReadGroupKeyManagementEventList : public ReadAttribute { public: - ReadBooleanStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadGroupKeyManagementEventList() + : ReadAttribute("event-list") { } - ~ReadBooleanStateClusterRevision() {} + ~ReadGroupKeyManagementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.EventList response %@", [value description]); if (error != nil) { - LogNSError("BooleanState ClusterRevision read Error", error); + LogNSError("GroupKeyManagement EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -36979,22 +39447,22 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeGroupKeyManagementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBooleanStateClusterRevision() {} + ~SubscribeAttributeGroupKeyManagementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37005,12 +39473,12 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37018,99 +39486,30 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute } }; -/*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeToMode | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeToMode - */ -class ModeSelectChangeToMode : public ClusterCommand { -public: - ModeSelectChangeToMode() - : ClusterCommand("change-to-mode") - { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeToModeWithParams:params - completion:^(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::ModeSelect::Commands::ChangeToMode::Type mRequest; -}; - /* - * Attribute Description + * Attribute AttributeList */ -class ReadModeSelectDescription : public ReadAttribute { +class ReadGroupKeyManagementAttributeList : public ReadAttribute { public: - ReadModeSelectDescription() - : ReadAttribute("description") + ReadGroupKeyManagementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadModeSelectDescription() {} + ~ReadGroupKeyManagementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect Description read Error", error); + LogNSError("GroupKeyManagement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -37118,22 +39517,22 @@ class ReadModeSelectDescription : public ReadAttribute { } }; -class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectDescription() - : SubscribeAttribute("description") + SubscribeAttributeGroupKeyManagementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeModeSelectDescription() {} + ~SubscribeAttributeGroupKeyManagementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37144,12 +39543,12 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDescriptionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37158,29 +39557,29 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { }; /* - * Attribute StandardNamespace + * Attribute FeatureMap */ -class ReadModeSelectStandardNamespace : public ReadAttribute { +class ReadGroupKeyManagementFeatureMap : public ReadAttribute { public: - ReadModeSelectStandardNamespace() - : ReadAttribute("standard-namespace") + ReadGroupKeyManagementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadModeSelectStandardNamespace() {} + ~ReadGroupKeyManagementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect StandardNamespace read Error", error); + LogNSError("GroupKeyManagement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -37188,22 +39587,22 @@ class ReadModeSelectStandardNamespace : public ReadAttribute { } }; -class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStandardNamespace() - : SubscribeAttribute("standard-namespace") + SubscribeAttributeGroupKeyManagementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeModeSelectStandardNamespace() {} + ~SubscribeAttributeGroupKeyManagementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37214,12 +39613,12 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStandardNamespaceWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); + NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37228,29 +39627,29 @@ class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute }; /* - * Attribute SupportedModes + * Attribute ClusterRevision */ -class ReadModeSelectSupportedModes : public ReadAttribute { +class ReadGroupKeyManagementClusterRevision : public ReadAttribute { public: - ReadModeSelectSupportedModes() - : ReadAttribute("supported-modes") + ReadGroupKeyManagementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadModeSelectSupportedModes() {} + ~ReadGroupKeyManagementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect SupportedModes read Error", error); + LogNSError("GroupKeyManagement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -37258,22 +39657,22 @@ class ReadModeSelectSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeModeSelectSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeGroupKeyManagementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeModeSelectSupportedModes() {} + ~SubscribeAttributeGroupKeyManagementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000003F) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37284,12 +39683,12 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37297,30 +39696,47 @@ class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute CurrentMode + * Attribute LabelList */ -class ReadModeSelectCurrentMode : public ReadAttribute { +class ReadFixedLabelLabelList : public ReadAttribute { public: - ReadModeSelectCurrentMode() - : ReadAttribute("current-mode") + ReadFixedLabelLabelList() + : ReadAttribute("label-list") { } - ~ReadModeSelectCurrentMode() {} + ~ReadFixedLabelLabelList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.LabelList response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect CurrentMode read Error", error); + LogNSError("FixedLabel LabelList read Error", error); } SetCommandExitStatus(error); }]; @@ -37328,20 +39744,20 @@ class ReadModeSelectCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { +class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeFixedLabelLabelList() + : SubscribeAttribute("label-list") { } - ~SubscribeAttributeModeSelectCurrentMode() {} + ~SubscribeAttributeFixedLabelLabelList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37354,12 +39770,12 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.LabelList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37368,29 +39784,29 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { }; /* - * Attribute StartUpMode + * Attribute GeneratedCommandList */ -class ReadModeSelectStartUpMode : public ReadAttribute { +class ReadFixedLabelGeneratedCommandList : public ReadAttribute { public: - ReadModeSelectStartUpMode() - : ReadAttribute("start-up-mode") + ReadFixedLabelGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadModeSelectStartUpMode() {} + ~ReadFixedLabelGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect StartUpMode read Error", error); + LogNSError("FixedLabel GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -37398,60 +39814,20 @@ class ReadModeSelectStartUpMode : public ReadAttribute { } }; -class WriteModeSelectStartUpMode : public WriteAttribute { -public: - WriteModeSelectStartUpMode() - : WriteAttribute("start-up-mode") - { - AddArgument("attr-name", "start-up-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteModeSelectStartUpMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeStartUpModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect StartUpMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { +class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeFixedLabelGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeModeSelectStartUpMode() {} + ~SubscribeAttributeFixedLabelGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37464,12 +39840,12 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.StartUpMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37478,29 +39854,29 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { }; /* - * Attribute OnMode + * Attribute AcceptedCommandList */ -class ReadModeSelectOnMode : public ReadAttribute { +class ReadFixedLabelAcceptedCommandList : public ReadAttribute { public: - ReadModeSelectOnMode() - : ReadAttribute("on-mode") + ReadFixedLabelAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadModeSelectOnMode() {} + ~ReadFixedLabelAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect OnMode read Error", error); + LogNSError("FixedLabel AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -37508,60 +39884,20 @@ class ReadModeSelectOnMode : public ReadAttribute { } }; -class WriteModeSelectOnMode : public WriteAttribute { -public: - WriteModeSelectOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteModeSelectOnMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOnModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ModeSelect OnMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { +class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeFixedLabelAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeModeSelectOnMode() {} + ~SubscribeAttributeFixedLabelAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37574,12 +39910,12 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.OnMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37588,29 +39924,29 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute EventList */ -class ReadModeSelectGeneratedCommandList : public ReadAttribute { +class ReadFixedLabelEventList : public ReadAttribute { public: - ReadModeSelectGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadFixedLabelEventList() + : ReadAttribute("event-list") { } - ~ReadModeSelectGeneratedCommandList() {} + ~ReadFixedLabelEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.EventList response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect GeneratedCommandList read Error", error); + LogNSError("FixedLabel EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -37618,20 +39954,20 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeFixedLabelEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeModeSelectGeneratedCommandList() {} + ~SubscribeAttributeFixedLabelEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37644,12 +39980,12 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"FixedLabel.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37658,29 +39994,29 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu }; /* - * Attribute AcceptedCommandList + * Attribute AttributeList */ -class ReadModeSelectAcceptedCommandList : public ReadAttribute { +class ReadFixedLabelAttributeList : public ReadAttribute { public: - ReadModeSelectAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadFixedLabelAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadModeSelectAcceptedCommandList() {} + ~ReadFixedLabelAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect AcceptedCommandList read Error", error); + LogNSError("FixedLabel AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -37688,20 +40024,20 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeFixedLabelAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeModeSelectAcceptedCommandList() {} + ~SubscribeAttributeFixedLabelAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37714,12 +40050,12 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"FixedLabel.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37728,29 +40064,29 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut }; /* - * Attribute AttributeList + * Attribute FeatureMap */ -class ReadModeSelectAttributeList : public ReadAttribute { +class ReadFixedLabelFeatureMap : public ReadAttribute { public: - ReadModeSelectAttributeList() - : ReadAttribute("attribute-list") + ReadFixedLabelFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadModeSelectAttributeList() {} + ~ReadFixedLabelFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect AttributeList read Error", error); + LogNSError("FixedLabel FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -37758,20 +40094,20 @@ class ReadModeSelectAttributeList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeFixedLabelFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeModeSelectAttributeList() {} + ~SubscribeAttributeFixedLabelFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37784,12 +40120,12 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37798,29 +40134,29 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute ClusterRevision */ -class ReadModeSelectFeatureMap : public ReadAttribute { +class ReadFixedLabelClusterRevision : public ReadAttribute { public: - ReadModeSelectFeatureMap() - : ReadAttribute("feature-map") + ReadFixedLabelClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadModeSelectFeatureMap() {} + ~ReadFixedLabelClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect FeatureMap read Error", error); + LogNSError("FixedLabel ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -37828,20 +40164,20 @@ class ReadModeSelectFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeModeSelectFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeFixedLabelClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeModeSelectFeatureMap() {} + ~SubscribeAttributeFixedLabelClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000040) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterFixedLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -37854,12 +40190,12 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37867,30 +40203,47 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster UserLabel | 0x0041 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute ClusterRevision + * Attribute LabelList */ -class ReadModeSelectClusterRevision : public ReadAttribute { +class ReadUserLabelLabelList : public ReadAttribute { public: - ReadModeSelectClusterRevision() - : ReadAttribute("cluster-revision") + ReadUserLabelLabelList() + : ReadAttribute("label-list") { } - ~ReadModeSelectClusterRevision() {} + ~ReadUserLabelLabelList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLabelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.LabelList response %@", [value description]); if (error != nil) { - LogNSError("ModeSelect ClusterRevision read Error", error); + LogNSError("UserLabel LabelList read Error", error); } SetCommandExitStatus(error); }]; @@ -37898,22 +40251,79 @@ class ReadModeSelectClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { +class WriteUserLabelLabelList : public WriteAttribute { public: - SubscribeAttributeModeSelectClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteUserLabelLabelList() + : WriteAttribute("label-list") + , mComplex(&mValue) { + AddArgument("attr-name", "label-list"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeModeSelectClusterRevision() {} + ~WriteUserLabelLabelList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) WriteAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRUserLabelClusterLabelStruct * newElement_0; + newElement_0 = [MTRUserLabelClusterLabelStruct new]; + newElement_0.label = [[NSString alloc] initWithBytes:entry_0.label.data() + length:entry_0.label.size() + encoding:NSUTF8StringEncoding]; + newElement_0.value = [[NSString alloc] initWithBytes:entry_0.value.data() + length:entry_0.value.size() + encoding:NSUTF8StringEncoding]; + [array_0 addObject:newElement_0]; + } + value = array_0; + } + + [cluster writeAttributeLabelListWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UserLabel LabelList write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; +}; + +class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { +public: + SubscribeAttributeUserLabelLabelList() + : SubscribeAttribute("label-list") + { + } + + ~SubscribeAttributeUserLabelLabelList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37924,12 +40334,12 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.LabelList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -37937,1028 +40347,676 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster DoorLock | 0x0101 | -|------------------------------------------------------------------------------| -| Commands: | | -| * LockDoor | 0x00 | -| * UnlockDoor | 0x01 | -| * UnlockWithTimeout | 0x03 | -| * SetWeekDaySchedule | 0x0B | -| * GetWeekDaySchedule | 0x0C | -| * ClearWeekDaySchedule | 0x0D | -| * SetYearDaySchedule | 0x0E | -| * GetYearDaySchedule | 0x0F | -| * ClearYearDaySchedule | 0x10 | -| * SetHolidaySchedule | 0x11 | -| * GetHolidaySchedule | 0x12 | -| * ClearHolidaySchedule | 0x13 | -| * SetUser | 0x1A | -| * GetUser | 0x1B | -| * ClearUser | 0x1D | -| * SetCredential | 0x22 | -| * GetCredentialStatus | 0x24 | -| * ClearCredential | 0x26 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LockState | 0x0000 | -| * LockType | 0x0001 | -| * ActuatorEnabled | 0x0002 | -| * DoorState | 0x0003 | -| * DoorOpenEvents | 0x0004 | -| * DoorClosedEvents | 0x0005 | -| * OpenPeriod | 0x0006 | -| * NumberOfTotalUsersSupported | 0x0011 | -| * NumberOfPINUsersSupported | 0x0012 | -| * NumberOfRFIDUsersSupported | 0x0013 | -| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | -| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | -| * NumberOfHolidaySchedulesSupported | 0x0016 | -| * MaxPINCodeLength | 0x0017 | -| * MinPINCodeLength | 0x0018 | -| * MaxRFIDCodeLength | 0x0019 | -| * MinRFIDCodeLength | 0x001A | -| * CredentialRulesSupport | 0x001B | -| * NumberOfCredentialsSupportedPerUser | 0x001C | -| * Language | 0x0021 | -| * LEDSettings | 0x0022 | -| * AutoRelockTime | 0x0023 | -| * SoundVolume | 0x0024 | -| * OperatingMode | 0x0025 | -| * SupportedOperatingModes | 0x0026 | -| * DefaultConfigurationRegister | 0x0027 | -| * EnableLocalProgramming | 0x0028 | -| * EnableOneTouchLocking | 0x0029 | -| * EnableInsideStatusLED | 0x002A | -| * EnablePrivacyModeButton | 0x002B | -| * LocalProgrammingFeatures | 0x002C | -| * WrongCodeEntryLimit | 0x0030 | -| * UserCodeTemporaryDisableTime | 0x0031 | -| * SendPINOverTheAir | 0x0032 | -| * RequirePINforRemoteOperation | 0x0033 | -| * ExpiringUserTimeout | 0x0035 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * DoorLockAlarm | 0x0000 | -| * DoorStateChange | 0x0001 | -| * LockOperation | 0x0002 | -| * LockOperationError | 0x0003 | -| * LockUserChange | 0x0004 | -\*----------------------------------------------------------------------------*/ - /* - * Command LockDoor + * Attribute GeneratedCommandList */ -class DoorLockLockDoor : public ClusterCommand { +class ReadUserLabelGeneratedCommandList : public ReadAttribute { public: - DoorLockLockDoor() - : ClusterCommand("lock-door") + ReadUserLabelGeneratedCommandList() + : ReadAttribute("generated-command-list") { - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } + ~ReadUserLabelGeneratedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster lockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("UserLabel GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; -/* - * Command UnlockDoor - */ -class DoorLockUnlockDoor : public ClusterCommand { +class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { public: - DoorLockUnlockDoor() - : ClusterCommand("unlock-door") + SubscribeAttributeUserLabelGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeUserLabelGeneratedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unlockDoorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; /* - * Command UnlockWithTimeout + * Attribute AcceptedCommandList */ -class DoorLockUnlockWithTimeout : public ClusterCommand { +class ReadUserLabelAcceptedCommandList : public ReadAttribute { public: - DoorLockUnlockWithTimeout() - : ClusterCommand("unlock-with-timeout") + ReadUserLabelAcceptedCommandList() + : ReadAttribute("accepted-command-list") { - AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); - AddArgument("PINCode", &mRequest.PINCode); - ClusterCommand::AddArguments(); } + ~ReadUserLabelAcceptedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; - if (mRequest.PINCode.HasValue()) { - params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; - } else { - params.pinCode = nil; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("UserLabel AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeUserLabelAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeUserLabelAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster unlockWithTimeoutWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; /* - * Command SetWeekDaySchedule + * Attribute EventList */ -class DoorLockSetWeekDaySchedule : public ClusterCommand { +class ReadUserLabelEventList : public ReadAttribute { public: - DoorLockSetWeekDaySchedule() - : ClusterCommand("set-week-day-schedule") + ReadUserLabelEventList() + : ReadAttribute("event-list") { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); - AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); - AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); - AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); - AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); - ClusterCommand::AddArguments(); } + ~ReadUserLabelEventList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; - params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; - params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; - params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; - params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.EventList response %@", [value description]); + if (error != nil) { + LogNSError("UserLabel EventList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; -/* - * Command GetWeekDaySchedule - */ -class DoorLockGetWeekDaySchedule : public ClusterCommand { +class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { public: - DoorLockGetWeekDaySchedule() - : ClusterCommand("get-week-day-schedule") + SubscribeAttributeUserLabelEventList() + : SubscribeAttribute("event-list") { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeUserLabelEventList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeekDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; /* - * Command ClearWeekDaySchedule + * Attribute AttributeList */ -class DoorLockClearWeekDaySchedule : public ClusterCommand { +class ReadUserLabelAttributeList : public ReadAttribute { public: - DoorLockClearWeekDaySchedule() - : ClusterCommand("clear-week-day-schedule") + ReadUserLabelAttributeList() + : ReadAttribute("attribute-list") { - AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~ReadUserLabelAttributeList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearWeekDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("UserLabel AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; -/* - * Command SetYearDaySchedule - */ -class DoorLockSetYearDaySchedule : public ClusterCommand { +class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { public: - DoorLockSetYearDaySchedule() - : ClusterCommand("set-year-day-schedule") + SubscribeAttributeUserLabelAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeUserLabelAttributeList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setYearDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; /* - * Command GetYearDaySchedule + * Attribute FeatureMap */ -class DoorLockGetYearDaySchedule : public ClusterCommand { +class ReadUserLabelFeatureMap : public ReadAttribute { public: - DoorLockGetYearDaySchedule() - : ClusterCommand("get-year-day-schedule") + ReadUserLabelFeatureMap() + : ReadAttribute("feature-map") { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~ReadUserLabelFeatureMap() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getYearDayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("UserLabel FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; -/* - * Command ClearYearDaySchedule - */ -class DoorLockClearYearDaySchedule : public ClusterCommand { +class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { public: - DoorLockClearYearDaySchedule() - : ClusterCommand("clear-year-day-schedule") + SubscribeAttributeUserLabelFeatureMap() + : SubscribeAttribute("feature-map") { - AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeUserLabelFeatureMap() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearYearDayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; /* - * Command SetHolidaySchedule + * Attribute ClusterRevision */ -class DoorLockSetHolidaySchedule : public ClusterCommand { +class ReadUserLabelClusterRevision : public ReadAttribute { public: - DoorLockSetHolidaySchedule() - : ClusterCommand("set-holiday-schedule") + ReadUserLabelClusterRevision() + : ReadAttribute("cluster-revision") { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); - AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); - AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); - ClusterCommand::AddArguments(); } + ~ReadUserLabelClusterRevision() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; - params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; - params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setHolidayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("UserLabel ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; }; -/* - * Command GetHolidaySchedule - */ -class DoorLockGetHolidaySchedule : public ClusterCommand { +class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { public: - DoorLockGetHolidaySchedule() - : ClusterCommand("get-holiday-schedule") + SubscribeAttributeUserLabelClusterRevision() + : SubscribeAttribute("cluster-revision") { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeUserLabelClusterRevision() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000041) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getHolidayScheduleWithParams:params - completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterUserLabel alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster ProxyConfiguration | 0x0042 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Command ClearHolidaySchedule + * Attribute GeneratedCommandList */ -class DoorLockClearHolidaySchedule : public ClusterCommand { +class ReadProxyConfigurationGeneratedCommandList : public ReadAttribute { public: - DoorLockClearHolidaySchedule() - : ClusterCommand("clear-holiday-schedule") + ReadProxyConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { - AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); - ClusterCommand::AddArguments(); } + ~ReadProxyConfigurationGeneratedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearHolidayScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("ProxyConfiguration GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; }; -/* - * Command SetUser - */ -class DoorLockSetUser : public ClusterCommand { +class SubscribeAttributeProxyConfigurationGeneratedCommandList : public SubscribeAttribute { public: - DoorLockSetUser() - : ClusterCommand("set-user") + SubscribeAttributeProxyConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserName", &mRequest.userName); - AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeProxyConfigurationGeneratedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - if (mRequest.userName.IsNull()) { - params.userName = nil; - } else { - params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() - length:mRequest.userName.Value().size() - encoding:NSUTF8StringEncoding]; - } - if (mRequest.userUniqueID.IsNull()) { - params.userUniqueID = nil; - } else { - params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; - } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - if (mRequest.credentialRule.IsNull()) { - params.credentialRule = nil; - } else { - params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetUser::Type mRequest; }; /* - * Command GetUser + * Attribute AcceptedCommandList */ -class DoorLockGetUser : public ClusterCommand { +class ReadProxyConfigurationAcceptedCommandList : public ReadAttribute { public: - DoorLockGetUser() - : ClusterCommand("get-user") + ReadProxyConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~ReadProxyConfigurationAcceptedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getUserWithParams:params - completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("ProxyConfiguration AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; -/* - * Command ClearUser - */ -class DoorLockClearUser : public ClusterCommand { +class SubscribeAttributeProxyConfigurationAcceptedCommandList : public SubscribeAttribute { public: - DoorLockClearUser() - : ClusterCommand("clear-user") + SubscribeAttributeProxyConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeProxyConfigurationAcceptedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearUserWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; }; /* - * Command SetCredential + * Attribute EventList */ -class DoorLockSetCredential : public ClusterCommand { +class ReadProxyConfigurationEventList : public ReadAttribute { public: - DoorLockSetCredential() - : ClusterCommand("set-credential") - , mComplex_Credential(&mRequest.credential) + ReadProxyConfigurationEventList() + : ReadAttribute("event-list") { - AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); - AddArgument("Credential", &mComplex_Credential); - AddArgument("CredentialData", &mRequest.credentialData); - AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); - AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); - AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); - ClusterCommand::AddArguments(); } + ~ReadProxyConfigurationEventList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; - if (mRequest.userIndex.IsNull()) { - params.userIndex = nil; - } else { - params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; - } - if (mRequest.userStatus.IsNull()) { - params.userStatus = nil; - } else { - params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; - } - if (mRequest.userType.IsNull()) { - params.userType = nil; - } else { - params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setCredentialWithParams:params - completion:^( - MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.EventList response %@", [value description]); + if (error != nil) { + LogNSError("ProxyConfiguration EventList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; - TypedComplexArgument mComplex_Credential; }; -/* - * Command GetCredentialStatus - */ -class DoorLockGetCredentialStatus : public ClusterCommand { +class SubscribeAttributeProxyConfigurationEventList : public SubscribeAttribute { public: - DoorLockGetCredentialStatus() - : ClusterCommand("get-credential-status") - , mComplex_Credential(&mRequest.credential) + SubscribeAttributeProxyConfigurationEventList() + : SubscribeAttribute("event-list") { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getCredentialStatusWithParams:params - completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; - TypedComplexArgument mComplex_Credential; -}; - -/* - * Command ClearCredential - */ -class DoorLockClearCredential : public ClusterCommand { -public: - DoorLockClearCredential() - : ClusterCommand("clear-credential") - , mComplex_Credential(&mRequest.credential) - { - AddArgument("Credential", &mComplex_Credential); - ClusterCommand::AddArguments(); - } + ~SubscribeAttributeProxyConfigurationEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.credential.IsNull()) { - params.credential = nil; - } else { - params.credential = [MTRDoorLockClusterCredentialStruct new]; - params.credential.credentialType = - [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; - params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster clearCredentialWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type mRequest; - TypedComplexArgument> - mComplex_Credential; }; /* - * Attribute LockState + * Attribute AttributeList */ -class ReadDoorLockLockState : public ReadAttribute { +class ReadProxyConfigurationAttributeList : public ReadAttribute { public: - ReadDoorLockLockState() - : ReadAttribute("lock-state") + ReadProxyConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDoorLockLockState() {} + ~ReadProxyConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock LockState read Error", error); + LogNSError("ProxyConfiguration AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -38966,20 +41024,22 @@ class ReadDoorLockLockState : public ReadAttribute { } }; -class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { +class SubscribeAttributeProxyConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLockState() - : SubscribeAttribute("lock-state") + SubscribeAttributeProxyConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDoorLockLockState() {} + ~SubscribeAttributeProxyConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38990,12 +41050,12 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLockStateWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39004,27 +41064,29 @@ class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { }; /* - * Attribute LockType + * Attribute FeatureMap */ -class ReadDoorLockLockType : public ReadAttribute { +class ReadProxyConfigurationFeatureMap : public ReadAttribute { public: - ReadDoorLockLockType() - : ReadAttribute("lock-type") + ReadProxyConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDoorLockLockType() {} + ~ReadProxyConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("DoorLock LockType read Error", error); + LogNSError("ProxyConfiguration FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -39032,20 +41094,22 @@ class ReadDoorLockLockType : public ReadAttribute { } }; -class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { +class SubscribeAttributeProxyConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLockType() - : SubscribeAttribute("lock-type") + SubscribeAttributeProxyConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDoorLockLockType() {} + ~SubscribeAttributeProxyConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39056,12 +41120,12 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLockTypeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LockType response %@", [value description]); + NSLog(@"ProxyConfiguration.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39070,27 +41134,29 @@ class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { }; /* - * Attribute ActuatorEnabled + * Attribute ClusterRevision */ -class ReadDoorLockActuatorEnabled : public ReadAttribute { +class ReadProxyConfigurationClusterRevision : public ReadAttribute { public: - ReadDoorLockActuatorEnabled() - : ReadAttribute("actuator-enabled") + ReadProxyConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDoorLockActuatorEnabled() {} + ~ReadProxyConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("DoorLock ActuatorEnabled read Error", error); + LogNSError("ProxyConfiguration ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -39098,20 +41164,22 @@ class ReadDoorLockActuatorEnabled : public ReadAttribute { } }; -class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { +class SubscribeAttributeProxyConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDoorLockActuatorEnabled() - : SubscribeAttribute("actuator-enabled") + SubscribeAttributeProxyConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDoorLockActuatorEnabled() {} + ~SubscribeAttributeProxyConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000042) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39122,12 +41190,12 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActuatorEnabledWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); + NSLog(@"ProxyConfiguration.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39135,28 +41203,46 @@ class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster ProxyDiscovery | 0x0043 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute DoorState + * Attribute GeneratedCommandList */ -class ReadDoorLockDoorState : public ReadAttribute { +class ReadProxyDiscoveryGeneratedCommandList : public ReadAttribute { public: - ReadDoorLockDoorState() - : ReadAttribute("door-state") + ReadProxyDiscoveryGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDoorLockDoorState() {} + ~ReadProxyDiscoveryGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock DoorState read Error", error); + LogNSError("ProxyDiscovery GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -39164,20 +41250,22 @@ class ReadDoorLockDoorState : public ReadAttribute { } }; -class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { +class SubscribeAttributeProxyDiscoveryGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorState() - : SubscribeAttribute("door-state") + SubscribeAttributeProxyDiscoveryGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDoorLockDoorState() {} + ~SubscribeAttributeProxyDiscoveryGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39188,12 +41276,12 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorStateWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39202,27 +41290,29 @@ class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { }; /* - * Attribute DoorOpenEvents + * Attribute AcceptedCommandList */ -class ReadDoorLockDoorOpenEvents : public ReadAttribute { +class ReadProxyDiscoveryAcceptedCommandList : public ReadAttribute { public: - ReadDoorLockDoorOpenEvents() - : ReadAttribute("door-open-events") + ReadProxyDiscoveryAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDoorLockDoorOpenEvents() {} + ~ReadProxyDiscoveryAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock DoorOpenEvents read Error", error); + LogNSError("ProxyDiscovery AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -39230,58 +41320,22 @@ class ReadDoorLockDoorOpenEvents : public ReadAttribute { } }; -class WriteDoorLockDoorOpenEvents : public WriteAttribute { -public: - WriteDoorLockDoorOpenEvents() - : WriteAttribute("door-open-events") - { - AddArgument("attr-name", "door-open-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockDoorOpenEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeDoorOpenEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { +class SubscribeAttributeProxyDiscoveryAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorOpenEvents() - : SubscribeAttribute("door-open-events") + SubscribeAttributeProxyDiscoveryAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDoorLockDoorOpenEvents() {} + ~SubscribeAttributeProxyDiscoveryAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39292,12 +41346,12 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorOpenEventsWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39306,27 +41360,29 @@ class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { }; /* - * Attribute DoorClosedEvents + * Attribute EventList */ -class ReadDoorLockDoorClosedEvents : public ReadAttribute { +class ReadProxyDiscoveryEventList : public ReadAttribute { public: - ReadDoorLockDoorClosedEvents() - : ReadAttribute("door-closed-events") + ReadProxyDiscoveryEventList() + : ReadAttribute("event-list") { } - ~ReadDoorLockDoorClosedEvents() {} + ~ReadProxyDiscoveryEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.EventList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock DoorClosedEvents read Error", error); + LogNSError("ProxyDiscovery EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -39334,58 +41390,22 @@ class ReadDoorLockDoorClosedEvents : public ReadAttribute { } }; -class WriteDoorLockDoorClosedEvents : public WriteAttribute { -public: - WriteDoorLockDoorClosedEvents() - : WriteAttribute("door-closed-events") - { - AddArgument("attr-name", "door-closed-events"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockDoorClosedEvents() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeDoorClosedEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock DoorClosedEvents write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { +class SubscribeAttributeProxyDiscoveryEventList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDoorClosedEvents() - : SubscribeAttribute("door-closed-events") + SubscribeAttributeProxyDiscoveryEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDoorLockDoorClosedEvents() {} + ~SubscribeAttributeProxyDiscoveryEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39396,12 +41416,12 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDoorClosedEventsWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39410,27 +41430,29 @@ class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { }; /* - * Attribute OpenPeriod + * Attribute AttributeList */ -class ReadDoorLockOpenPeriod : public ReadAttribute { +class ReadProxyDiscoveryAttributeList : public ReadAttribute { public: - ReadDoorLockOpenPeriod() - : ReadAttribute("open-period") + ReadProxyDiscoveryAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDoorLockOpenPeriod() {} + ~ReadProxyDiscoveryAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock OpenPeriod read Error", error); + LogNSError("ProxyDiscovery AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -39438,58 +41460,22 @@ class ReadDoorLockOpenPeriod : public ReadAttribute { } }; -class WriteDoorLockOpenPeriod : public WriteAttribute { -public: - WriteDoorLockOpenPeriod() - : WriteAttribute("open-period") - { - AddArgument("attr-name", "open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockOpenPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000006) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeOpenPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { +class SubscribeAttributeProxyDiscoveryAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockOpenPeriod() - : SubscribeAttribute("open-period") + SubscribeAttributeProxyDiscoveryAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDoorLockOpenPeriod() {} + ~SubscribeAttributeProxyDiscoveryAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39500,12 +41486,12 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOpenPeriodWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OpenPeriod response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39514,27 +41500,29 @@ class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { }; /* - * Attribute NumberOfTotalUsersSupported + * Attribute FeatureMap */ -class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { +class ReadProxyDiscoveryFeatureMap : public ReadAttribute { public: - ReadDoorLockNumberOfTotalUsersSupported() - : ReadAttribute("number-of-total-users-supported") + ReadProxyDiscoveryFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDoorLockNumberOfTotalUsersSupported() {} + ~ReadProxyDiscoveryFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); + LogNSError("ProxyDiscovery FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -39542,20 +41530,22 @@ class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { +class SubscribeAttributeProxyDiscoveryFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfTotalUsersSupported() - : SubscribeAttribute("number-of-total-users-supported") + SubscribeAttributeProxyDiscoveryFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() {} + ~SubscribeAttributeProxyDiscoveryFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39566,12 +41556,12 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); + NSLog(@"ProxyDiscovery.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39580,27 +41570,29 @@ class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAt }; /* - * Attribute NumberOfPINUsersSupported + * Attribute ClusterRevision */ -class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { +class ReadProxyDiscoveryClusterRevision : public ReadAttribute { public: - ReadDoorLockNumberOfPINUsersSupported() - : ReadAttribute("number-of-pinusers-supported") + ReadProxyDiscoveryClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDoorLockNumberOfPINUsersSupported() {} + ~ReadProxyDiscoveryClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyDiscovery.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); + LogNSError("ProxyDiscovery ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -39608,20 +41600,22 @@ class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { +class SubscribeAttributeProxyDiscoveryClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfPINUsersSupported() - : SubscribeAttribute("number-of-pinusers-supported") + SubscribeAttributeProxyDiscoveryClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() {} + ~SubscribeAttributeProxyDiscoveryClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000043) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyDiscovery alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39632,12 +41626,12 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); + NSLog(@"ProxyDiscovery.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39645,28 +41639,46 @@ class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttr } }; +/*----------------------------------------------------------------------------*\ +| Cluster ProxyValid | 0x0044 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute NumberOfRFIDUsersSupported + * Attribute GeneratedCommandList */ -class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { +class ReadProxyValidGeneratedCommandList : public ReadAttribute { public: - ReadDoorLockNumberOfRFIDUsersSupported() - : ReadAttribute("number-of-rfidusers-supported") + ReadProxyValidGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDoorLockNumberOfRFIDUsersSupported() {} + ~ReadProxyValidGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); + LogNSError("ProxyValid GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -39674,20 +41686,22 @@ class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { +class SubscribeAttributeProxyValidGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() - : SubscribeAttribute("number-of-rfidusers-supported") + SubscribeAttributeProxyValidGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() {} + ~SubscribeAttributeProxyValidGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39698,12 +41712,12 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39712,28 +41726,29 @@ class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAtt }; /* - * Attribute NumberOfWeekDaySchedulesSupportedPerUser + * Attribute AcceptedCommandList */ -class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { +class ReadProxyValidAcceptedCommandList : public ReadAttribute { public: - ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-week-day-schedules-supported-per-user") + ReadProxyValidAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} + ~ReadProxyValidAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); + LogNSError("ProxyValid AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -39741,20 +41756,22 @@ class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribut } }; -class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { +class SubscribeAttributeProxyValidAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") + SubscribeAttributeProxyValidAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} + ~SubscribeAttributeProxyValidAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39765,12 +41782,12 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39779,28 +41796,29 @@ class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : publi }; /* - * Attribute NumberOfYearDaySchedulesSupportedPerUser + * Attribute EventList */ -class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { +class ReadProxyValidEventList : public ReadAttribute { public: - ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : ReadAttribute("number-of-year-day-schedules-supported-per-user") + ReadProxyValidEventList() + : ReadAttribute("event-list") { } - ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} + ~ReadProxyValidEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.EventList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); + LogNSError("ProxyValid EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -39808,20 +41826,22 @@ class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribut } }; -class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { +class SubscribeAttributeProxyValidEventList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() - : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") + SubscribeAttributeProxyValidEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} + ~SubscribeAttributeProxyValidEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39832,12 +41852,12 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39846,49 +41866,52 @@ class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : publi }; /* - * Attribute NumberOfHolidaySchedulesSupported + * Attribute AttributeList */ -class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { +class ReadProxyValidAttributeList : public ReadAttribute { public: - ReadDoorLockNumberOfHolidaySchedulesSupported() - : ReadAttribute("number-of-holiday-schedules-supported") + ReadProxyValidAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDoorLockNumberOfHolidaySchedulesSupported() {} + ~ReadProxyValidAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("ProxyValid AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { +class SubscribeAttributeProxyValidAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() - : SubscribeAttribute("number-of-holiday-schedules-supported") + SubscribeAttributeProxyValidAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() {} + ~SubscribeAttributeProxyValidAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39899,12 +41922,12 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39913,27 +41936,29 @@ class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public Subsc }; /* - * Attribute MaxPINCodeLength + * Attribute FeatureMap */ -class ReadDoorLockMaxPINCodeLength : public ReadAttribute { +class ReadProxyValidFeatureMap : public ReadAttribute { public: - ReadDoorLockMaxPINCodeLength() - : ReadAttribute("max-pincode-length") + ReadProxyValidFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDoorLockMaxPINCodeLength() {} + ~ReadProxyValidFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("DoorLock MaxPINCodeLength read Error", error); + LogNSError("ProxyValid FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -39941,20 +41966,22 @@ class ReadDoorLockMaxPINCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { +class SubscribeAttributeProxyValidFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDoorLockMaxPINCodeLength() - : SubscribeAttribute("max-pincode-length") + SubscribeAttributeProxyValidFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDoorLockMaxPINCodeLength() {} + ~SubscribeAttributeProxyValidFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39965,12 +41992,12 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPINCodeLengthWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); + NSLog(@"ProxyValid.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -39979,27 +42006,29 @@ class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { }; /* - * Attribute MinPINCodeLength + * Attribute ClusterRevision */ -class ReadDoorLockMinPINCodeLength : public ReadAttribute { +class ReadProxyValidClusterRevision : public ReadAttribute { public: - ReadDoorLockMinPINCodeLength() - : ReadAttribute("min-pincode-length") + ReadProxyValidClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDoorLockMinPINCodeLength() {} + ~ReadProxyValidClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000018) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ProxyValid.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("DoorLock MinPINCodeLength read Error", error); + LogNSError("ProxyValid ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -40007,20 +42036,22 @@ class ReadDoorLockMinPINCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { +class SubscribeAttributeProxyValidClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDoorLockMinPINCodeLength() - : SubscribeAttribute("min-pincode-length") + SubscribeAttributeProxyValidClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDoorLockMinPINCodeLength() {} + ~SubscribeAttributeProxyValidClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000018) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000044) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterProxyValid alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40031,12 +42062,12 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinPINCodeLengthWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + NSLog(@"ProxyValid.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40044,28 +42075,48 @@ class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster BooleanState | 0x0045 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * StateValue | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChange | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MaxRFIDCodeLength + * Attribute StateValue */ -class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { +class ReadBooleanStateStateValue : public ReadAttribute { public: - ReadDoorLockMaxRFIDCodeLength() - : ReadAttribute("max-rfidcode-length") + ReadBooleanStateStateValue() + : ReadAttribute("state-value") { } - ~ReadDoorLockMaxRFIDCodeLength() {} + ~ReadBooleanStateStateValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000019) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.StateValue response %@", [value description]); if (error != nil) { - LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + LogNSError("BooleanState StateValue read Error", error); } SetCommandExitStatus(error); }]; @@ -40073,20 +42124,22 @@ class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { +class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { public: - SubscribeAttributeDoorLockMaxRFIDCodeLength() - : SubscribeAttribute("max-rfidcode-length") + SubscribeAttributeBooleanStateStateValue() + : SubscribeAttribute("state-value") { } - ~SubscribeAttributeDoorLockMaxRFIDCodeLength() {} + ~SubscribeAttributeBooleanStateStateValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000019) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40097,12 +42150,12 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params + [cluster subscribeAttributeStateValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + NSLog(@"BooleanState.StateValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40111,27 +42164,29 @@ class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { }; /* - * Attribute MinRFIDCodeLength + * Attribute GeneratedCommandList */ -class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { +class ReadBooleanStateGeneratedCommandList : public ReadAttribute { public: - ReadDoorLockMinRFIDCodeLength() - : ReadAttribute("min-rfidcode-length") + ReadBooleanStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDoorLockMinRFIDCodeLength() {} + ~ReadBooleanStateGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock MinRFIDCodeLength read Error", error); + LogNSError("BooleanState GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -40139,20 +42194,22 @@ class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { } }; -class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { +class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockMinRFIDCodeLength() - : SubscribeAttribute("min-rfidcode-length") + SubscribeAttributeBooleanStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDoorLockMinRFIDCodeLength() {} + ~SubscribeAttributeBooleanStateGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40163,12 +42220,12 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40177,27 +42234,29 @@ class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { }; /* - * Attribute CredentialRulesSupport + * Attribute AcceptedCommandList */ -class ReadDoorLockCredentialRulesSupport : public ReadAttribute { +class ReadBooleanStateAcceptedCommandList : public ReadAttribute { public: - ReadDoorLockCredentialRulesSupport() - : ReadAttribute("credential-rules-support") + ReadBooleanStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDoorLockCredentialRulesSupport() {} + ~ReadBooleanStateAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock CredentialRulesSupport read Error", error); + LogNSError("BooleanState AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -40205,20 +42264,22 @@ class ReadDoorLockCredentialRulesSupport : public ReadAttribute { } }; -class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockCredentialRulesSupport() - : SubscribeAttribute("credential-rules-support") + SubscribeAttributeBooleanStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDoorLockCredentialRulesSupport() {} + ~SubscribeAttributeBooleanStateAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40229,12 +42290,12 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCredentialRulesSupportWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40243,28 +42304,29 @@ class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribu }; /* - * Attribute NumberOfCredentialsSupportedPerUser + * Attribute EventList */ -class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { +class ReadBooleanStateEventList : public ReadAttribute { public: - ReadDoorLockNumberOfCredentialsSupportedPerUser() - : ReadAttribute("number-of-credentials-supported-per-user") + ReadBooleanStateEventList() + : ReadAttribute("event-list") { } - ~ReadDoorLockNumberOfCredentialsSupportedPerUser() {} + ~ReadBooleanStateEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.EventList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); + LogNSError("BooleanState EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -40272,20 +42334,22 @@ class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { } }; -class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { +class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() - : SubscribeAttribute("number-of-credentials-supported-per-user") + SubscribeAttributeBooleanStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() {} + ~SubscribeAttributeBooleanStateEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40296,12 +42360,12 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40310,27 +42374,29 @@ class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public Sub }; /* - * Attribute Language + * Attribute AttributeList */ -class ReadDoorLockLanguage : public ReadAttribute { +class ReadBooleanStateAttributeList : public ReadAttribute { public: - ReadDoorLockLanguage() - : ReadAttribute("language") + ReadBooleanStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDoorLockLanguage() {} + ~ReadBooleanStateAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock Language read Error", error); + LogNSError("BooleanState AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -40338,60 +42404,22 @@ class ReadDoorLockLanguage : public ReadAttribute { } }; -class WriteDoorLockLanguage : public WriteAttribute { -public: - WriteDoorLockLanguage() - : WriteAttribute("language") - { - AddArgument("attr-name", "language"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLanguage() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLanguageWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock Language write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLanguage() - : SubscribeAttribute("language") + SubscribeAttributeBooleanStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDoorLockLanguage() {} + ~SubscribeAttributeBooleanStateAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40402,12 +42430,12 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLanguageWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.Language response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40416,27 +42444,29 @@ class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { }; /* - * Attribute LEDSettings + * Attribute FeatureMap */ -class ReadDoorLockLEDSettings : public ReadAttribute { +class ReadBooleanStateFeatureMap : public ReadAttribute { public: - ReadDoorLockLEDSettings() - : ReadAttribute("ledsettings") + ReadBooleanStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDoorLockLEDSettings() {} + ~ReadBooleanStateFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("DoorLock LEDSettings read Error", error); + LogNSError("BooleanState FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -40444,58 +42474,22 @@ class ReadDoorLockLEDSettings : public ReadAttribute { } }; -class WriteDoorLockLEDSettings : public WriteAttribute { -public: - WriteDoorLockLEDSettings() - : WriteAttribute("ledsettings") - { - AddArgument("attr-name", "ledsettings"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLEDSettings() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000022) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLEDSettingsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LEDSettings write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { +class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLEDSettings() - : SubscribeAttribute("ledsettings") + SubscribeAttributeBooleanStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDoorLockLEDSettings() {} + ~SubscribeAttributeBooleanStateFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40506,12 +42500,12 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLEDSettingsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LEDSettings response %@", [value description]); + NSLog(@"BooleanState.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40520,27 +42514,29 @@ class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { }; /* - * Attribute AutoRelockTime + * Attribute ClusterRevision */ -class ReadDoorLockAutoRelockTime : public ReadAttribute { +class ReadBooleanStateClusterRevision : public ReadAttribute { public: - ReadDoorLockAutoRelockTime() - : ReadAttribute("auto-relock-time") + ReadBooleanStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDoorLockAutoRelockTime() {} + ~ReadBooleanStateClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000023) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("DoorLock AutoRelockTime read Error", error); + LogNSError("BooleanState ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -40548,58 +42544,22 @@ class ReadDoorLockAutoRelockTime : public ReadAttribute { } }; -class WriteDoorLockAutoRelockTime : public WriteAttribute { +class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { public: - WriteDoorLockAutoRelockTime() - : WriteAttribute("auto-relock-time") - { - AddArgument("attr-name", "auto-relock-time"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockAutoRelockTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000023) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeAutoRelockTimeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock AutoRelockTime write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockAutoRelockTime() - : SubscribeAttribute("auto-relock-time") + SubscribeAttributeBooleanStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDoorLockAutoRelockTime() {} + ~SubscribeAttributeBooleanStateClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000023) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000045) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBooleanState alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40610,12 +42570,12 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAutoRelockTimeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); + NSLog(@"BooleanState.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40623,87 +42583,122 @@ class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster ModeSelect | 0x0050 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeToMode | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Description | 0x0000 | +| * StandardNamespace | 0x0001 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute SoundVolume + * Command ChangeToMode */ -class ReadDoorLockSoundVolume : public ReadAttribute { +class ModeSelectChangeToMode : public ClusterCommand { public: - ReadDoorLockSoundVolume() - : ReadAttribute("sound-volume") + ModeSelectChangeToMode() + : ClusterCommand("change-to-mode") { + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + ClusterCommand::AddArguments(); } - ~ReadDoorLockSoundVolume() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000024) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock SoundVolume read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeToModeWithParams:params + completion:^(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::ModeSelect::Commands::ChangeToMode::Type mRequest; }; -class WriteDoorLockSoundVolume : public WriteAttribute { +/* + * Attribute Description + */ +class ReadModeSelectDescription : public ReadAttribute { public: - WriteDoorLockSoundVolume() - : WriteAttribute("sound-volume") + ReadModeSelectDescription() + : ReadAttribute("description") { - AddArgument("attr-name", "sound-volume"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteDoorLockSoundVolume() {} + ~ReadModeSelectDescription() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000024) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000000) on endpoint %u", endpointId); - [cluster writeAttributeSoundVolumeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SoundVolume write Error", error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); + if (error != nil) { + LogNSError("ModeSelect Description read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { +class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSoundVolume() - : SubscribeAttribute("sound-volume") + SubscribeAttributeModeSelectDescription() + : SubscribeAttribute("description") { } - ~SubscribeAttributeDoorLockSoundVolume() {} + ~SubscribeAttributeModeSelectDescription() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000024) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40714,12 +42709,12 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoundVolumeWithParams:params + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SoundVolume response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40728,27 +42723,29 @@ class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { }; /* - * Attribute OperatingMode + * Attribute StandardNamespace */ -class ReadDoorLockOperatingMode : public ReadAttribute { +class ReadModeSelectStandardNamespace : public ReadAttribute { public: - ReadDoorLockOperatingMode() - : ReadAttribute("operating-mode") + ReadModeSelectStandardNamespace() + : ReadAttribute("standard-namespace") { } - ~ReadDoorLockOperatingMode() {} + ~ReadModeSelectStandardNamespace() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000025) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStandardNamespaceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); if (error != nil) { - LogNSError("DoorLock OperatingMode read Error", error); + LogNSError("ModeSelect StandardNamespace read Error", error); } SetCommandExitStatus(error); }]; @@ -40756,58 +42753,22 @@ class ReadDoorLockOperatingMode : public ReadAttribute { } }; -class WriteDoorLockOperatingMode : public WriteAttribute { -public: - WriteDoorLockOperatingMode() - : WriteAttribute("operating-mode") - { - AddArgument("attr-name", "operating-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockOperatingMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000025) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOperatingModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock OperatingMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { +class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { public: - SubscribeAttributeDoorLockOperatingMode() - : SubscribeAttribute("operating-mode") + SubscribeAttributeModeSelectStandardNamespace() + : SubscribeAttribute("standard-namespace") { } - ~SubscribeAttributeDoorLockOperatingMode() {} + ~SubscribeAttributeModeSelectStandardNamespace() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000025) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40818,12 +42779,12 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperatingModeWithParams:params + [cluster subscribeAttributeStandardNamespaceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.OperatingMode response %@", [value description]); + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40832,27 +42793,29 @@ class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { }; /* - * Attribute SupportedOperatingModes + * Attribute SupportedModes */ -class ReadDoorLockSupportedOperatingModes : public ReadAttribute { +class ReadModeSelectSupportedModes : public ReadAttribute { public: - ReadDoorLockSupportedOperatingModes() - : ReadAttribute("supported-operating-modes") + ReadModeSelectSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadDoorLockSupportedOperatingModes() {} + ~ReadModeSelectSupportedModes() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000026) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error != nil) { - LogNSError("DoorLock SupportedOperatingModes read Error", error); + LogNSError("ModeSelect SupportedModes read Error", error); } SetCommandExitStatus(error); }]; @@ -40860,20 +42823,22 @@ class ReadDoorLockSupportedOperatingModes : public ReadAttribute { } }; -class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { +class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSupportedOperatingModes() - : SubscribeAttribute("supported-operating-modes") + SubscribeAttributeModeSelectSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeDoorLockSupportedOperatingModes() {} + ~SubscribeAttributeModeSelectSupportedModes() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000026) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40884,12 +42849,12 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedOperatingModesWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40898,27 +42863,29 @@ class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttrib }; /* - * Attribute DefaultConfigurationRegister + * Attribute CurrentMode */ -class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { +class ReadModeSelectCurrentMode : public ReadAttribute { public: - ReadDoorLockDefaultConfigurationRegister() - : ReadAttribute("default-configuration-register") + ReadModeSelectCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadDoorLockDefaultConfigurationRegister() {} + ~ReadModeSelectCurrentMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000027) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error != nil) { - LogNSError("DoorLock DefaultConfigurationRegister read Error", error); + LogNSError("ModeSelect CurrentMode read Error", error); } SetCommandExitStatus(error); }]; @@ -40926,20 +42893,22 @@ class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { } }; -class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { +class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeDoorLockDefaultConfigurationRegister() - : SubscribeAttribute("default-configuration-register") + SubscribeAttributeModeSelectCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeDoorLockDefaultConfigurationRegister() {} + ~SubscribeAttributeModeSelectCurrentMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000027) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40950,12 +42919,12 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -40964,27 +42933,29 @@ class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeA }; /* - * Attribute EnableLocalProgramming + * Attribute StartUpMode */ -class ReadDoorLockEnableLocalProgramming : public ReadAttribute { +class ReadModeSelectStartUpMode : public ReadAttribute { public: - ReadDoorLockEnableLocalProgramming() - : ReadAttribute("enable-local-programming") + ReadModeSelectStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadDoorLockEnableLocalProgramming() {} + ~ReadModeSelectStartUpMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000028) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming read Error", error); + LogNSError("ModeSelect StartUpMode read Error", error); } SetCommandExitStatus(error); }]; @@ -40992,58 +42963,62 @@ class ReadDoorLockEnableLocalProgramming : public ReadAttribute { } }; -class WriteDoorLockEnableLocalProgramming : public WriteAttribute { +class WriteModeSelectStartUpMode : public WriteAttribute { public: - WriteDoorLockEnableLocalProgramming() - : WriteAttribute("enable-local-programming") + WriteModeSelectStartUpMode() + : WriteAttribute("start-up-mode") { - AddArgument("attr-name", "enable-local-programming"); - AddArgument("attr-value", 0, 1, &mValue); + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteDoorLockEnableLocalProgramming() {} + ~WriteModeSelectStartUpMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000028) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeEnableLocalProgrammingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableLocalProgramming write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeStartUpModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ModeSelect StartUpMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - bool mValue; + uint8_t mValue; }; -class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { +class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableLocalProgramming() - : SubscribeAttribute("enable-local-programming") + SubscribeAttributeModeSelectStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeDoorLockEnableLocalProgramming() {} + ~SubscribeAttributeModeSelectStartUpMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000028) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41054,12 +43029,12 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableLocalProgrammingWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41068,27 +43043,29 @@ class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribu }; /* - * Attribute EnableOneTouchLocking + * Attribute OnMode */ -class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { +class ReadModeSelectOnMode : public ReadAttribute { public: - ReadDoorLockEnableOneTouchLocking() - : ReadAttribute("enable-one-touch-locking") + ReadModeSelectOnMode() + : ReadAttribute("on-mode") { } - ~ReadDoorLockEnableOneTouchLocking() {} + ~ReadModeSelectOnMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000029) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.OnMode response %@", [value description]); if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking read Error", error); + LogNSError("ModeSelect OnMode read Error", error); } SetCommandExitStatus(error); }]; @@ -41096,58 +43073,62 @@ class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { } }; -class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { +class WriteModeSelectOnMode : public WriteAttribute { public: - WriteDoorLockEnableOneTouchLocking() - : WriteAttribute("enable-one-touch-locking") + WriteModeSelectOnMode() + : WriteAttribute("on-mode") { - AddArgument("attr-name", "enable-one-touch-locking"); - AddArgument("attr-value", 0, 1, &mValue); + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteDoorLockEnableOneTouchLocking() {} + ~WriteModeSelectOnMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000029) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeEnableOneTouchLockingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableOneTouchLocking write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeOnModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ModeSelect OnMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - bool mValue; + uint8_t mValue; }; -class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { +class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableOneTouchLocking() - : SubscribeAttribute("enable-one-touch-locking") + SubscribeAttributeModeSelectOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeDoorLockEnableOneTouchLocking() {} + ~SubscribeAttributeModeSelectOnMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000029) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41158,12 +43139,12 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableOneTouchLockingWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + NSLog(@"ModeSelect.OnMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41172,27 +43153,29 @@ class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribut }; /* - * Attribute EnableInsideStatusLED + * Attribute GeneratedCommandList */ -class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { +class ReadModeSelectGeneratedCommandList : public ReadAttribute { public: - ReadDoorLockEnableInsideStatusLED() - : ReadAttribute("enable-inside-status-led") + ReadModeSelectGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDoorLockEnableInsideStatusLED() {} + ~ReadModeSelectGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED read Error", error); + LogNSError("ModeSelect GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -41200,58 +43183,22 @@ class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { } }; -class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { -public: - WriteDoorLockEnableInsideStatusLED() - : WriteAttribute("enable-inside-status-led") - { - AddArgument("attr-name", "enable-inside-status-led"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnableInsideStatusLED() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnableInsideStatusLEDWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnableInsideStatusLED write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { +class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnableInsideStatusLED() - : SubscribeAttribute("enable-inside-status-led") + SubscribeAttributeModeSelectGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDoorLockEnableInsideStatusLED() {} + ~SubscribeAttributeModeSelectGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41262,12 +43209,12 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41276,27 +43223,29 @@ class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribut }; /* - * Attribute EnablePrivacyModeButton + * Attribute AcceptedCommandList */ -class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { +class ReadModeSelectAcceptedCommandList : public ReadAttribute { public: - ReadDoorLockEnablePrivacyModeButton() - : ReadAttribute("enable-privacy-mode-button") + ReadModeSelectAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDoorLockEnablePrivacyModeButton() {} + ~ReadModeSelectAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton read Error", error); + LogNSError("ModeSelect AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -41304,58 +43253,22 @@ class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { } }; -class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { -public: - WriteDoorLockEnablePrivacyModeButton() - : WriteAttribute("enable-privacy-mode-button") - { - AddArgument("attr-name", "enable-privacy-mode-button"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockEnablePrivacyModeButton() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeEnablePrivacyModeButtonWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock EnablePrivacyModeButton write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { +class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockEnablePrivacyModeButton() - : SubscribeAttribute("enable-privacy-mode-button") + SubscribeAttributeModeSelectAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDoorLockEnablePrivacyModeButton() {} + ~SubscribeAttributeModeSelectAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41366,12 +43279,12 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41380,27 +43293,29 @@ class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttrib }; /* - * Attribute LocalProgrammingFeatures + * Attribute EventList */ -class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { +class ReadModeSelectEventList : public ReadAttribute { public: - ReadDoorLockLocalProgrammingFeatures() - : ReadAttribute("local-programming-features") + ReadModeSelectEventList() + : ReadAttribute("event-list") { } - ~ReadDoorLockLocalProgrammingFeatures() {} + ~ReadModeSelectEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures read Error", error); + LogNSError("ModeSelect EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -41408,58 +43323,22 @@ class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { } }; -class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { -public: - WriteDoorLockLocalProgrammingFeatures() - : WriteAttribute("local-programming-features") - { - AddArgument("attr-name", "local-programming-features"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockLocalProgrammingFeatures() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLocalProgrammingFeaturesWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock LocalProgrammingFeatures write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { +class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockLocalProgrammingFeatures() - : SubscribeAttribute("local-programming-features") + SubscribeAttributeModeSelectEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDoorLockLocalProgrammingFeatures() {} + ~SubscribeAttributeModeSelectEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41470,12 +43349,12 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41484,27 +43363,29 @@ class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttri }; /* - * Attribute WrongCodeEntryLimit + * Attribute AttributeList */ -class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { +class ReadModeSelectAttributeList : public ReadAttribute { public: - ReadDoorLockWrongCodeEntryLimit() - : ReadAttribute("wrong-code-entry-limit") + ReadModeSelectAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDoorLockWrongCodeEntryLimit() {} + ~ReadModeSelectAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit read Error", error); + LogNSError("ModeSelect AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -41512,58 +43393,22 @@ class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { } }; -class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { -public: - WriteDoorLockWrongCodeEntryLimit() - : WriteAttribute("wrong-code-entry-limit") - { - AddArgument("attr-name", "wrong-code-entry-limit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockWrongCodeEntryLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeWrongCodeEntryLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock WrongCodeEntryLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { +class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDoorLockWrongCodeEntryLimit() - : SubscribeAttribute("wrong-code-entry-limit") + SubscribeAttributeModeSelectAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDoorLockWrongCodeEntryLimit() {} + ~SubscribeAttributeModeSelectAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41574,12 +43419,12 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41588,27 +43433,29 @@ class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute }; /* - * Attribute UserCodeTemporaryDisableTime + * Attribute FeatureMap */ -class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { +class ReadModeSelectFeatureMap : public ReadAttribute { public: - ReadDoorLockUserCodeTemporaryDisableTime() - : ReadAttribute("user-code-temporary-disable-time") + ReadModeSelectFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDoorLockUserCodeTemporaryDisableTime() {} + ~ReadModeSelectFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); + LogNSError("ModeSelect FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -41616,59 +43463,22 @@ class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { } }; -class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { -public: - WriteDoorLockUserCodeTemporaryDisableTime() - : WriteAttribute("user-code-temporary-disable-time") - { - AddArgument("attr-name", "user-code-temporary-disable-time"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockUserCodeTemporaryDisableTime() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeUserCodeTemporaryDisableTimeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { +class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() - : SubscribeAttribute("user-code-temporary-disable-time") + SubscribeAttributeModeSelectFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() {} + ~SubscribeAttributeModeSelectFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41679,12 +43489,12 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41693,27 +43503,29 @@ class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeA }; /* - * Attribute SendPINOverTheAir + * Attribute ClusterRevision */ -class ReadDoorLockSendPINOverTheAir : public ReadAttribute { +class ReadModeSelectClusterRevision : public ReadAttribute { public: - ReadDoorLockSendPINOverTheAir() - : ReadAttribute("send-pinover-the-air") + ReadModeSelectClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDoorLockSendPINOverTheAir() {} + ~ReadModeSelectClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir read Error", error); + LogNSError("ModeSelect ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -41721,58 +43533,22 @@ class ReadDoorLockSendPINOverTheAir : public ReadAttribute { } }; -class WriteDoorLockSendPINOverTheAir : public WriteAttribute { -public: - WriteDoorLockSendPINOverTheAir() - : WriteAttribute("send-pinover-the-air") - { - AddArgument("attr-name", "send-pinover-the-air"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockSendPINOverTheAir() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster writeAttributeSendPINOverTheAirWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock SendPINOverTheAir write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; - -class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { +class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDoorLockSendPINOverTheAir() - : SubscribeAttribute("send-pinover-the-air") + SubscribeAttributeModeSelectClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDoorLockSendPINOverTheAir() {} + ~SubscribeAttributeModeSelectClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000050) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -41783,12 +43559,12 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSendPINOverTheAirWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -41796,840 +43572,883 @@ class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { } }; -/* - * Attribute RequirePINforRemoteOperation - */ -class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { -public: - ReadDoorLockRequirePINforRemoteOperation() - : ReadAttribute("require-pinfor-remote-operation") - { - } - - ~ReadDoorLockRequirePINforRemoteOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000033) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { -public: - WriteDoorLockRequirePINforRemoteOperation() - : WriteAttribute("require-pinfor-remote-operation") - { - AddArgument("attr-name", "require-pinfor-remote-operation"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockRequirePINforRemoteOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000033) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - - [cluster - writeAttributeRequirePINforRemoteOperationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - bool mValue; -}; +/*----------------------------------------------------------------------------*\ +| Cluster DoorLock | 0x0101 | +|------------------------------------------------------------------------------| +| Commands: | | +| * LockDoor | 0x00 | +| * UnlockDoor | 0x01 | +| * UnlockWithTimeout | 0x03 | +| * SetWeekDaySchedule | 0x0B | +| * GetWeekDaySchedule | 0x0C | +| * ClearWeekDaySchedule | 0x0D | +| * SetYearDaySchedule | 0x0E | +| * GetYearDaySchedule | 0x0F | +| * ClearYearDaySchedule | 0x10 | +| * SetHolidaySchedule | 0x11 | +| * GetHolidaySchedule | 0x12 | +| * ClearHolidaySchedule | 0x13 | +| * SetUser | 0x1A | +| * GetUser | 0x1B | +| * ClearUser | 0x1D | +| * SetCredential | 0x22 | +| * GetCredentialStatus | 0x24 | +| * ClearCredential | 0x26 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LockState | 0x0000 | +| * LockType | 0x0001 | +| * ActuatorEnabled | 0x0002 | +| * DoorState | 0x0003 | +| * DoorOpenEvents | 0x0004 | +| * DoorClosedEvents | 0x0005 | +| * OpenPeriod | 0x0006 | +| * NumberOfTotalUsersSupported | 0x0011 | +| * NumberOfPINUsersSupported | 0x0012 | +| * NumberOfRFIDUsersSupported | 0x0013 | +| * NumberOfWeekDaySchedulesSupportedPerUser | 0x0014 | +| * NumberOfYearDaySchedulesSupportedPerUser | 0x0015 | +| * NumberOfHolidaySchedulesSupported | 0x0016 | +| * MaxPINCodeLength | 0x0017 | +| * MinPINCodeLength | 0x0018 | +| * MaxRFIDCodeLength | 0x0019 | +| * MinRFIDCodeLength | 0x001A | +| * CredentialRulesSupport | 0x001B | +| * NumberOfCredentialsSupportedPerUser | 0x001C | +| * Language | 0x0021 | +| * LEDSettings | 0x0022 | +| * AutoRelockTime | 0x0023 | +| * SoundVolume | 0x0024 | +| * OperatingMode | 0x0025 | +| * SupportedOperatingModes | 0x0026 | +| * DefaultConfigurationRegister | 0x0027 | +| * EnableLocalProgramming | 0x0028 | +| * EnableOneTouchLocking | 0x0029 | +| * EnableInsideStatusLED | 0x002A | +| * EnablePrivacyModeButton | 0x002B | +| * LocalProgrammingFeatures | 0x002C | +| * WrongCodeEntryLimit | 0x0030 | +| * UserCodeTemporaryDisableTime | 0x0031 | +| * SendPINOverTheAir | 0x0032 | +| * RequirePINforRemoteOperation | 0x0033 | +| * ExpiringUserTimeout | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * DoorLockAlarm | 0x0000 | +| * DoorStateChange | 0x0001 | +| * LockOperation | 0x0002 | +| * LockOperationError | 0x0003 | +| * LockUserChange | 0x0004 | +\*----------------------------------------------------------------------------*/ -class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { +/* + * Command LockDoor + */ +class DoorLockLockDoor : public ClusterCommand { public: - SubscribeAttributeDoorLockRequirePINforRemoteOperation() - : SubscribeAttribute("require-pinfor-remote-operation") + DoorLockLockDoor() + : ClusterCommand("lock-door") { + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster lockDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::LockDoor::Type mRequest; }; /* - * Attribute ExpiringUserTimeout + * Command UnlockDoor */ -class ReadDoorLockExpiringUserTimeout : public ReadAttribute { +class DoorLockUnlockDoor : public ClusterCommand { public: - ReadDoorLockExpiringUserTimeout() - : ReadAttribute("expiring-user-timeout") + DoorLockUnlockDoor() + : ClusterCommand("unlock-door") { + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); } - ~ReadDoorLockExpiringUserTimeout() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000035) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDoorLockExpiringUserTimeout : public WriteAttribute { -public: - WriteDoorLockExpiringUserTimeout() - : WriteAttribute("expiring-user-timeout") - { - AddArgument("attr-name", "expiring-user-timeout"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDoorLockExpiringUserTimeout() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout + __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeExpiringUserTimeoutWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DoorLock ExpiringUserTimeout write Error", error); - } - SetCommandExitStatus(error); - }]; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockDoorWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } private: - uint16_t mValue; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type mRequest; }; -class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { +/* + * Command UnlockWithTimeout + */ +class DoorLockUnlockWithTimeout : public ClusterCommand { public: - SubscribeAttributeDoorLockExpiringUserTimeout() - : SubscribeAttribute("expiring-user-timeout") + DoorLockUnlockWithTimeout() + : ClusterCommand("unlock-with-timeout") { + AddArgument("Timeout", 0, UINT16_MAX, &mRequest.timeout); + AddArgument("PINCode", &mRequest.PINCode); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeDoorLockExpiringUserTimeout() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __auto_type * params = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.timeout = [NSNumber numberWithUnsignedShort:mRequest.timeout]; + if (mRequest.PINCode.HasValue()) { + params.pinCode = [NSData dataWithBytes:mRequest.PINCode.Value().data() length:mRequest.PINCode.Value().size()]; + } else { + params.pinCode = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unlockWithTimeoutWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeExpiringUserTimeoutWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Command SetWeekDaySchedule */ -class ReadDoorLockGeneratedCommandList : public ReadAttribute { +class DoorLockSetWeekDaySchedule : public ClusterCommand { public: - ReadDoorLockGeneratedCommandList() - : ReadAttribute("generated-command-list") + DoorLockSetWeekDaySchedule() + : ClusterCommand("set-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("DaysMask", 0, UINT8_MAX, &mRequest.daysMask); + AddArgument("StartHour", 0, UINT8_MAX, &mRequest.startHour); + AddArgument("StartMinute", 0, UINT8_MAX, &mRequest.startMinute); + AddArgument("EndHour", 0, UINT8_MAX, &mRequest.endHour); + AddArgument("EndMinute", 0, UINT8_MAX, &mRequest.endMinute); + ClusterCommand::AddArguments(); } - ~ReadDoorLockGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * params = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.daysMask = [NSNumber numberWithUnsignedChar:mRequest.daysMask.Raw()]; + params.startHour = [NSNumber numberWithUnsignedChar:mRequest.startHour]; + params.startMinute = [NSNumber numberWithUnsignedChar:mRequest.startMinute]; + params.endHour = [NSNumber numberWithUnsignedChar:mRequest.endHour]; + params.endMinute = [NSNumber numberWithUnsignedChar:mRequest.endMinute]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeekDayScheduleWithParams:params + completion:^(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::DoorLock::Commands::SetWeekDaySchedule::Type mRequest; }; -class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { +/* + * Command GetWeekDaySchedule + */ +class DoorLockGetWeekDaySchedule : public ClusterCommand { public: - SubscribeAttributeDoorLockGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + DoorLockGetWeekDaySchedule() + : ClusterCommand("get-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeDoorLockGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * params = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeekDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetWeekDayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type mRequest; }; /* - * Attribute AcceptedCommandList + * Command ClearWeekDaySchedule */ -class ReadDoorLockAcceptedCommandList : public ReadAttribute { +class DoorLockClearWeekDaySchedule : public ClusterCommand { public: - ReadDoorLockAcceptedCommandList() - : ReadAttribute("accepted-command-list") + DoorLockClearWeekDaySchedule() + : ClusterCommand("clear-week-day-schedule") { + AddArgument("WeekDayIndex", 0, UINT8_MAX, &mRequest.weekDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~ReadDoorLockAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * params = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.weekDayIndex = [NSNumber numberWithUnsignedChar:mRequest.weekDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearWeekDayScheduleWithParams:params + completion:^(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::DoorLock::Commands::ClearWeekDaySchedule::Type mRequest; }; -class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { +/* + * Command SetYearDaySchedule + */ +class DoorLockSetYearDaySchedule : public ClusterCommand { public: - SubscribeAttributeDoorLockAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + DoorLockSetYearDaySchedule() + : ClusterCommand("set-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeDoorLockAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * params = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type mRequest; }; /* - * Attribute AttributeList + * Command GetYearDaySchedule */ -class ReadDoorLockAttributeList : public ReadAttribute { +class DoorLockGetYearDaySchedule : public ClusterCommand { public: - ReadDoorLockAttributeList() - : ReadAttribute("attribute-list") + DoorLockGetYearDaySchedule() + : ClusterCommand("get-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~ReadDoorLockAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeDoorLockAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * params = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getYearDayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetYearDayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type mRequest; }; /* - * Attribute FeatureMap + * Command ClearYearDaySchedule */ -class ReadDoorLockFeatureMap : public ReadAttribute { +class DoorLockClearYearDaySchedule : public ClusterCommand { public: - ReadDoorLockFeatureMap() - : ReadAttribute("feature-map") + DoorLockClearYearDaySchedule() + : ClusterCommand("clear-year-day-schedule") { + AddArgument("YearDayIndex", 0, UINT8_MAX, &mRequest.yearDayIndex); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + ClusterCommand::AddArguments(); } - ~ReadDoorLockFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeDoorLockFeatureMap() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * params = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.yearDayIndex = [NSNumber numberWithUnsignedChar:mRequest.yearDayIndex]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearYearDayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type mRequest; }; /* - * Attribute ClusterRevision + * Command SetHolidaySchedule */ -class ReadDoorLockClusterRevision : public ReadAttribute { +class DoorLockSetHolidaySchedule : public ClusterCommand { public: - ReadDoorLockClusterRevision() - : ReadAttribute("cluster-revision") + DoorLockSetHolidaySchedule() + : ClusterCommand("set-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); + AddArgument("LocalStartTime", 0, UINT32_MAX, &mRequest.localStartTime); + AddArgument("LocalEndTime", 0, UINT32_MAX, &mRequest.localEndTime); + AddArgument("OperatingMode", 0, UINT8_MAX, &mRequest.operatingMode); + ClusterCommand::AddArguments(); } - ~ReadDoorLockClusterRevision() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("DoorLock ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeDoorLockClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeDoorLockClusterRevision() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * params = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; + params.localStartTime = [NSNumber numberWithUnsignedInt:mRequest.localStartTime]; + params.localEndTime = [NSNumber numberWithUnsignedInt:mRequest.localEndTime]; + params.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operatingMode)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setHolidayScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DoorLock.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -/*----------------------------------------------------------------------------*\ -| Cluster WindowCovering | 0x0102 | -|------------------------------------------------------------------------------| -| Commands: | | -| * UpOrOpen | 0x00 | -| * DownOrClose | 0x01 | -| * StopMotion | 0x02 | -| * GoToLiftValue | 0x04 | -| * GoToLiftPercentage | 0x05 | -| * GoToTiltValue | 0x07 | -| * GoToTiltPercentage | 0x08 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Type | 0x0000 | -| * PhysicalClosedLimitLift | 0x0001 | -| * PhysicalClosedLimitTilt | 0x0002 | -| * CurrentPositionLift | 0x0003 | -| * CurrentPositionTilt | 0x0004 | -| * NumberOfActuationsLift | 0x0005 | -| * NumberOfActuationsTilt | 0x0006 | -| * ConfigStatus | 0x0007 | -| * CurrentPositionLiftPercentage | 0x0008 | -| * CurrentPositionTiltPercentage | 0x0009 | -| * OperationalStatus | 0x000A | -| * TargetPositionLiftPercent100ths | 0x000B | -| * TargetPositionTiltPercent100ths | 0x000C | -| * EndProductType | 0x000D | -| * CurrentPositionLiftPercent100ths | 0x000E | -| * CurrentPositionTiltPercent100ths | 0x000F | -| * InstalledOpenLimitLift | 0x0010 | -| * InstalledClosedLimitLift | 0x0011 | -| * InstalledOpenLimitTilt | 0x0012 | -| * InstalledClosedLimitTilt | 0x0013 | -| * Mode | 0x0017 | -| * SafetyStatus | 0x001A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +private: + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type mRequest; +}; /* - * Command UpOrOpen + * Command GetHolidaySchedule */ -class WindowCoveringUpOrOpen : public ClusterCommand { +class DoorLockGetHolidaySchedule : public ClusterCommand { public: - WindowCoveringUpOrOpen() - : ClusterCommand("up-or-open") + DoorLockGetHolidaySchedule() + : ClusterCommand("get-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster upOrOpenWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getHolidayScheduleWithParams:params + completion:^(MTRDoorLockClusterGetHolidayScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type mRequest; }; /* - * Command DownOrClose + * Command ClearHolidaySchedule */ -class WindowCoveringDownOrClose : public ClusterCommand { +class DoorLockClearHolidaySchedule : public ClusterCommand { public: - WindowCoveringDownOrClose() - : ClusterCommand("down-or-close") + DoorLockClearHolidaySchedule() + : ClusterCommand("clear-holiday-schedule") { + AddArgument("HolidayIndex", 0, UINT8_MAX, &mRequest.holidayIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.holidayIndex = [NSNumber numberWithUnsignedChar:mRequest.holidayIndex]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster downOrCloseWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster clearHolidayScheduleWithParams:params + completion:^(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::DoorLock::Commands::ClearHolidaySchedule::Type mRequest; }; /* - * Command StopMotion + * Command SetUser */ -class WindowCoveringStopMotion : public ClusterCommand { +class DoorLockSetUser : public ClusterCommand { public: - WindowCoveringStopMotion() - : ClusterCommand("stop-motion") + DoorLockSetUser() + : ClusterCommand("set-user") { + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserName", &mRequest.userName); + AddArgument("UserUniqueID", 0, UINT32_MAX, &mRequest.userUniqueID); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); + AddArgument("CredentialRule", 0, UINT8_MAX, &mRequest.credentialRule); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetUserParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; + if (mRequest.userName.IsNull()) { + params.userName = nil; + } else { + params.userName = [[NSString alloc] initWithBytes:mRequest.userName.Value().data() + length:mRequest.userName.Value().size() + encoding:NSUTF8StringEncoding]; + } + if (mRequest.userUniqueID.IsNull()) { + params.userUniqueID = nil; + } else { + params.userUniqueID = [NSNumber numberWithUnsignedInt:mRequest.userUniqueID.Value()]; + } + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; + } + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } + if (mRequest.credentialRule.IsNull()) { + params.credentialRule = nil; + } else { + params.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credentialRule.Value())]; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster stopMotionWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster setUserWithParams:params + completion:^(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::DoorLock::Commands::SetUser::Type mRequest; }; /* - * Command GoToLiftValue + * Command GetUser */ -class WindowCoveringGoToLiftValue : public ClusterCommand { +class DoorLockGetUser : public ClusterCommand { public: - WindowCoveringGoToLiftValue() - : ClusterCommand("go-to-lift-value") + DoorLockGetUser() + : ClusterCommand("get-user") { - AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetUserParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToLiftValueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getUserWithParams:params + completion:^(MTRDoorLockClusterGetUserResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetUser::Type mRequest; }; /* - * Command GoToLiftPercentage + * Command ClearUser */ -class WindowCoveringGoToLiftPercentage : public ClusterCommand { +class DoorLockClearUser : public ClusterCommand { public: - WindowCoveringGoToLiftPercentage() - : ClusterCommand("go-to-lift-percentage") + DoorLockClearUser() + : ClusterCommand("clear-user") { - AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000001D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToLiftPercentageWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } + [cluster clearUserWithParams:params + completion:^(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::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type mRequest; }; /* - * Command GoToTiltValue + * Command SetCredential */ -class WindowCoveringGoToTiltValue : public ClusterCommand { +class DoorLockSetCredential : public ClusterCommand { public: - WindowCoveringGoToTiltValue() - : ClusterCommand("go-to-tilt-value") + DoorLockSetCredential() + : ClusterCommand("set-credential") + , mComplex_Credential(&mRequest.credential) { - AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); + AddArgument("OperationType", 0, UINT8_MAX, &mRequest.operationType); + AddArgument("Credential", &mComplex_Credential); + AddArgument("CredentialData", &mRequest.credentialData); + AddArgument("UserIndex", 0, UINT16_MAX, &mRequest.userIndex); + AddArgument("UserStatus", 0, UINT8_MAX, &mRequest.userStatus); + AddArgument("UserType", 0, UINT8_MAX, &mRequest.userType); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; + params.operationType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.operationType)]; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; + params.credentialData = [NSData dataWithBytes:mRequest.credentialData.data() length:mRequest.credentialData.size()]; + if (mRequest.userIndex.IsNull()) { + params.userIndex = nil; + } else { + params.userIndex = [NSNumber numberWithUnsignedShort:mRequest.userIndex.Value()]; + } + if (mRequest.userStatus.IsNull()) { + params.userStatus = nil; + } else { + params.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userStatus.Value())]; + } + if (mRequest.userType.IsNull()) { + params.userType = nil; + } else { + params.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.userType.Value())]; + } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToTiltValueWithParams:params - completion:^(NSError * _Nullable error) { + [cluster setCredentialWithParams:params + completion:^( + MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); responsesNeeded--; if (error != nil) { mError = error; @@ -42644,79 +44463,137 @@ class WindowCoveringGoToTiltValue : public ClusterCommand { } private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Command GoToTiltPercentage + * Command GetCredentialStatus */ -class WindowCoveringGoToTiltPercentage : public ClusterCommand { +class DoorLockGetCredentialStatus : public ClusterCommand { public: - WindowCoveringGoToTiltPercentage() - : ClusterCommand("go-to-tilt-percentage") + DoorLockGetCredentialStatus() + : ClusterCommand("get-credential-status") + , mComplex_Credential(&mRequest.credential) { - AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); + AddArgument("Credential", &mComplex_Credential); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.credentialIndex]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster goToTiltPercentageWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster getCredentialStatusWithParams:params + completion:^(MTRDoorLockClusterGetCredentialStatusResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type mRequest; + TypedComplexArgument mComplex_Credential; }; /* - * Attribute Type + * Command ClearCredential */ -class ReadWindowCoveringType : public ReadAttribute { +class DoorLockClearCredential : public ClusterCommand { public: - ReadWindowCoveringType() - : ReadAttribute("type") + DoorLockClearCredential() + : ClusterCommand("clear-credential") + , mComplex_Credential(&mRequest.credential) { + AddArgument("Credential", &mComplex_Credential); + ClusterCommand::AddArguments(); } - ~ReadWindowCoveringType() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000026) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.credential.IsNull()) { + params.credential = nil; + } else { + params.credential = [MTRDoorLockClusterCredentialStruct new]; + params.credential.credentialType = + [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.credential.Value().credentialType)]; + params.credential.credentialIndex = [NSNumber numberWithUnsignedShort:mRequest.credential.Value().credentialIndex]; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearCredentialWithParams:params + completion:^(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::DoorLock::Commands::ClearCredential::Type mRequest; + TypedComplexArgument> + mComplex_Credential; +}; + +/* + * Attribute LockState + */ +class ReadDoorLockLockState : public ReadAttribute { +public: + ReadDoorLockLockState() + : ReadAttribute("lock-state") + { + } + + ~ReadDoorLockLockState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockState response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering Type read Error", error); + LogNSError("DoorLock LockState read Error", error); } SetCommandExitStatus(error); }]; @@ -42724,22 +44601,20 @@ class ReadWindowCoveringType : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { +class SubscribeAttributeDoorLockLockState : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringType() - : SubscribeAttribute("type") + SubscribeAttributeDoorLockLockState() + : SubscribeAttribute("lock-state") { } - ~SubscribeAttributeWindowCoveringType() {} + ~SubscribeAttributeDoorLockLockState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42750,12 +44625,12 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTypeWithParams:params + [cluster subscribeAttributeLockStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Type response %@", [value description]); + NSLog(@"DoorLock.LockState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42764,29 +44639,27 @@ class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { }; /* - * Attribute PhysicalClosedLimitLift + * Attribute LockType */ -class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { +class ReadDoorLockLockType : public ReadAttribute { public: - ReadWindowCoveringPhysicalClosedLimitLift() - : ReadAttribute("physical-closed-limit-lift") + ReadDoorLockLockType() + : ReadAttribute("lock-type") { } - ~ReadWindowCoveringPhysicalClosedLimitLift() {} + ~ReadDoorLockLockType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLockTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LockType response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); + LogNSError("DoorLock LockType read Error", error); } SetCommandExitStatus(error); }]; @@ -42794,22 +44667,20 @@ class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { +class SubscribeAttributeDoorLockLockType : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() - : SubscribeAttribute("physical-closed-limit-lift") + SubscribeAttributeDoorLockLockType() + : SubscribeAttribute("lock-type") { } - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() {} + ~SubscribeAttributeDoorLockLockType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42820,12 +44691,12 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params + [cluster subscribeAttributeLockTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); + NSLog(@"DoorLock.LockType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42834,29 +44705,27 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public Subscribe }; /* - * Attribute PhysicalClosedLimitTilt + * Attribute ActuatorEnabled */ -class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { +class ReadDoorLockActuatorEnabled : public ReadAttribute { public: - ReadWindowCoveringPhysicalClosedLimitTilt() - : ReadAttribute("physical-closed-limit-tilt") + ReadDoorLockActuatorEnabled() + : ReadAttribute("actuator-enabled") { } - ~ReadWindowCoveringPhysicalClosedLimitTilt() {} + ~ReadDoorLockActuatorEnabled() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActuatorEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); + LogNSError("DoorLock ActuatorEnabled read Error", error); } SetCommandExitStatus(error); }]; @@ -42864,22 +44733,20 @@ class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { +class SubscribeAttributeDoorLockActuatorEnabled : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() - : SubscribeAttribute("physical-closed-limit-tilt") + SubscribeAttributeDoorLockActuatorEnabled() + : SubscribeAttribute("actuator-enabled") { } - ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() {} + ~SubscribeAttributeDoorLockActuatorEnabled() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42890,12 +44757,12 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params + [cluster subscribeAttributeActuatorEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); + NSLog(@"DoorLock.ActuatorEnabled response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42904,29 +44771,27 @@ class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public Subscribe }; /* - * Attribute CurrentPositionLift + * Attribute DoorState */ -class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { +class ReadDoorLockDoorState : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLift() - : ReadAttribute("current-position-lift") + ReadDoorLockDoorState() + : ReadAttribute("door-state") { } - ~ReadWindowCoveringCurrentPositionLift() {} + ~ReadDoorLockDoorState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorState response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering CurrentPositionLift read Error", error); + LogNSError("DoorLock DoorState read Error", error); } SetCommandExitStatus(error); }]; @@ -42934,22 +44799,20 @@ class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { +class SubscribeAttributeDoorLockDoorState : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLift() - : SubscribeAttribute("current-position-lift") + SubscribeAttributeDoorLockDoorState() + : SubscribeAttribute("door-state") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLift() {} + ~SubscribeAttributeDoorLockDoorState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -42960,12 +44823,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftWithParams:params + [cluster subscribeAttributeDoorStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); + NSLog(@"DoorLock.DoorState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -42974,29 +44837,27 @@ class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttr }; /* - * Attribute CurrentPositionTilt + * Attribute DoorOpenEvents */ -class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { +class ReadDoorLockDoorOpenEvents : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTilt() - : ReadAttribute("current-position-tilt") + ReadDoorLockDoorOpenEvents() + : ReadAttribute("door-open-events") { } - ~ReadWindowCoveringCurrentPositionTilt() {} + ~ReadDoorLockDoorOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering CurrentPositionTilt read Error", error); + LogNSError("DoorLock DoorOpenEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -43004,22 +44865,58 @@ class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { +class WriteDoorLockDoorOpenEvents : public WriteAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTilt() - : SubscribeAttribute("current-position-tilt") + WriteDoorLockDoorOpenEvents() + : WriteAttribute("door-open-events") { + AddArgument("attr-name", "door-open-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringCurrentPositionTilt() {} + ~WriteDoorLockDoorOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorOpenEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockDoorOpenEvents : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockDoorOpenEvents() + : SubscribeAttribute("door-open-events") + { + } + + ~SubscribeAttributeDoorLockDoorOpenEvents() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43030,12 +44927,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltWithParams:params + [cluster subscribeAttributeDoorOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); + NSLog(@"DoorLock.DoorOpenEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43044,29 +44941,27 @@ class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttr }; /* - * Attribute NumberOfActuationsLift + * Attribute DoorClosedEvents */ -class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { +class ReadDoorLockDoorClosedEvents : public ReadAttribute { public: - ReadWindowCoveringNumberOfActuationsLift() - : ReadAttribute("number-of-actuations-lift") + ReadDoorLockDoorClosedEvents() + : ReadAttribute("door-closed-events") { } - ~ReadWindowCoveringNumberOfActuationsLift() {} + ~ReadDoorLockDoorClosedEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDoorClosedEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering NumberOfActuationsLift read Error", error); + LogNSError("DoorLock DoorClosedEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -43074,22 +44969,58 @@ class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { +class WriteDoorLockDoorClosedEvents : public WriteAttribute { public: - SubscribeAttributeWindowCoveringNumberOfActuationsLift() - : SubscribeAttribute("number-of-actuations-lift") + WriteDoorLockDoorClosedEvents() + : WriteAttribute("door-closed-events") { + AddArgument("attr-name", "door-closed-events"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() {} + ~WriteDoorLockDoorClosedEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeDoorClosedEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock DoorClosedEvents write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockDoorClosedEvents : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockDoorClosedEvents() + : SubscribeAttribute("door-closed-events") + { + } + + ~SubscribeAttributeDoorLockDoorClosedEvents() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43100,12 +45031,12 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params + [cluster subscribeAttributeDoorClosedEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); + NSLog(@"DoorLock.DoorClosedEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43114,29 +45045,27 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeA }; /* - * Attribute NumberOfActuationsTilt + * Attribute OpenPeriod */ -class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { +class ReadDoorLockOpenPeriod : public ReadAttribute { public: - ReadWindowCoveringNumberOfActuationsTilt() - : ReadAttribute("number-of-actuations-tilt") + ReadDoorLockOpenPeriod() + : ReadAttribute("open-period") { } - ~ReadWindowCoveringNumberOfActuationsTilt() {} + ~ReadDoorLockOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OpenPeriod response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); + LogNSError("DoorLock OpenPeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -43144,22 +45073,58 @@ class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { +class WriteDoorLockOpenPeriod : public WriteAttribute { public: - SubscribeAttributeWindowCoveringNumberOfActuationsTilt() - : SubscribeAttribute("number-of-actuations-tilt") + WriteDoorLockOpenPeriod() + : WriteAttribute("open-period") { + AddArgument("attr-name", "open-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() {} + ~WriteDoorLockOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeOpenPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeDoorLockOpenPeriod : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockOpenPeriod() + : SubscribeAttribute("open-period") + { + } + + ~SubscribeAttributeDoorLockOpenPeriod() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000006) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43170,12 +45135,12 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params + [cluster subscribeAttributeOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); + NSLog(@"DoorLock.OpenPeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43184,29 +45149,27 @@ class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeA }; /* - * Attribute ConfigStatus + * Attribute NumberOfTotalUsersSupported */ -class ReadWindowCoveringConfigStatus : public ReadAttribute { +class ReadDoorLockNumberOfTotalUsersSupported : public ReadAttribute { public: - ReadWindowCoveringConfigStatus() - : ReadAttribute("config-status") + ReadDoorLockNumberOfTotalUsersSupported() + : ReadAttribute("number-of-total-users-supported") { } - ~ReadWindowCoveringConfigStatus() {} + ~ReadDoorLockNumberOfTotalUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering ConfigStatus read Error", error); + LogNSError("DoorLock NumberOfTotalUsersSupported read Error", error); } SetCommandExitStatus(error); }]; @@ -43214,22 +45177,20 @@ class ReadWindowCoveringConfigStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfTotalUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringConfigStatus() - : SubscribeAttribute("config-status") + SubscribeAttributeDoorLockNumberOfTotalUsersSupported() + : SubscribeAttribute("number-of-total-users-supported") { } - ~SubscribeAttributeWindowCoveringConfigStatus() {} + ~SubscribeAttributeDoorLockNumberOfTotalUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43240,12 +45201,12 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConfigStatusWithParams:params + [cluster subscribeAttributeNumberOfTotalUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); + NSLog(@"DoorLock.NumberOfTotalUsersSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43254,29 +45215,27 @@ class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { }; /* - * Attribute CurrentPositionLiftPercentage + * Attribute NumberOfPINUsersSupported */ -class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { +class ReadDoorLockNumberOfPINUsersSupported : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLiftPercentage() - : ReadAttribute("current-position-lift-percentage") + ReadDoorLockNumberOfPINUsersSupported() + : ReadAttribute("number-of-pinusers-supported") { } - ~ReadWindowCoveringCurrentPositionLiftPercentage() {} + ~ReadDoorLockNumberOfPINUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPINUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); + LogNSError("DoorLock NumberOfPINUsersSupported read Error", error); } SetCommandExitStatus(error); }]; @@ -43284,22 +45243,20 @@ class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfPINUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() - : SubscribeAttribute("current-position-lift-percentage") + SubscribeAttributeDoorLockNumberOfPINUsersSupported() + : SubscribeAttribute("number-of-pinusers-supported") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() {} + ~SubscribeAttributeDoorLockNumberOfPINUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43310,12 +45267,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params + [cluster subscribeAttributeNumberOfPINUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); + NSLog(@"DoorLock.NumberOfPINUsersSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43324,29 +45281,27 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public Sub }; /* - * Attribute CurrentPositionTiltPercentage + * Attribute NumberOfRFIDUsersSupported */ -class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { +class ReadDoorLockNumberOfRFIDUsersSupported : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTiltPercentage() - : ReadAttribute("current-position-tilt-percentage") + ReadDoorLockNumberOfRFIDUsersSupported() + : ReadAttribute("number-of-rfidusers-supported") { } - ~ReadWindowCoveringCurrentPositionTiltPercentage() {} + ~ReadDoorLockNumberOfRFIDUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfRFIDUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); + LogNSError("DoorLock NumberOfRFIDUsersSupported read Error", error); } SetCommandExitStatus(error); }]; @@ -43354,22 +45309,20 @@ class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfRFIDUsersSupported : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() - : SubscribeAttribute("current-position-tilt-percentage") + SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() + : SubscribeAttribute("number-of-rfidusers-supported") { } - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() {} + ~SubscribeAttributeDoorLockNumberOfRFIDUsersSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43380,12 +45333,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params + [cluster subscribeAttributeNumberOfRFIDUsersSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); + NSLog(@"DoorLock.NumberOfRFIDUsersSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43394,29 +45347,28 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public Sub }; /* - * Attribute OperationalStatus + * Attribute NumberOfWeekDaySchedulesSupportedPerUser */ -class ReadWindowCoveringOperationalStatus : public ReadAttribute { +class ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public ReadAttribute { public: - ReadWindowCoveringOperationalStatus() - : ReadAttribute("operational-status") + ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-week-day-schedules-supported-per-user") { } - ~ReadWindowCoveringOperationalStatus() {} + ~ReadDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfWeekDaySchedulesSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering OperationalStatus read Error", error); + LogNSError("DoorLock NumberOfWeekDaySchedulesSupportedPerUser read Error", error); } SetCommandExitStatus(error); }]; @@ -43424,22 +45376,20 @@ class ReadWindowCoveringOperationalStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringOperationalStatus() - : SubscribeAttribute("operational-status") + SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-week-day-schedules-supported-per-user") { } - ~SubscribeAttributeWindowCoveringOperationalStatus() {} + ~SubscribeAttributeDoorLockNumberOfWeekDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43450,12 +45400,12 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStatusWithParams:params + [cluster subscribeAttributeNumberOfWeekDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); + NSLog(@"DoorLock.NumberOfWeekDaySchedulesSupportedPerUser response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43464,53 +45414,49 @@ class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttrib }; /* - * Attribute TargetPositionLiftPercent100ths + * Attribute NumberOfYearDaySchedulesSupportedPerUser */ -class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { +class ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser : public ReadAttribute { public: - ReadWindowCoveringTargetPositionLiftPercent100ths() - : ReadAttribute("target-position-lift-percent100ths") + ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : ReadAttribute("number-of-year-day-schedules-supported-per-user") { } - ~ReadWindowCoveringTargetPositionLiftPercent100ths() {} + ~ReadDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfYearDaySchedulesSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock NumberOfYearDaySchedulesSupportedPerUser read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() - : SubscribeAttribute("target-position-lift-percent100ths") + SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() + : SubscribeAttribute("number-of-year-day-schedules-supported-per-user") { } - ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() {} + ~SubscribeAttributeDoorLockNumberOfYearDaySchedulesSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43521,12 +45467,12 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params + [cluster subscribeAttributeNumberOfYearDaySchedulesSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + NSLog(@"DoorLock.NumberOfYearDaySchedulesSupportedPerUser response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43535,30 +45481,28 @@ class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public S }; /* - * Attribute TargetPositionTiltPercent100ths + * Attribute NumberOfHolidaySchedulesSupported */ -class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { +class ReadDoorLockNumberOfHolidaySchedulesSupported : public ReadAttribute { public: - ReadWindowCoveringTargetPositionTiltPercent100ths() - : ReadAttribute("target-position-tilt-percent100ths") + ReadDoorLockNumberOfHolidaySchedulesSupported() + : ReadAttribute("number-of-holiday-schedules-supported") { } - ~ReadWindowCoveringTargetPositionTiltPercent100ths() {} + ~ReadDoorLockNumberOfHolidaySchedulesSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster - readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + readAttributeNumberOfHolidaySchedulesSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + LogNSError("DoorLock NumberOfHolidaySchedulesSupported read Error", error); } SetCommandExitStatus(error); }]; @@ -43566,22 +45510,20 @@ class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() - : SubscribeAttribute("target-position-tilt-percent100ths") + SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() + : SubscribeAttribute("number-of-holiday-schedules-supported") { } - ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() {} + ~SubscribeAttributeDoorLockNumberOfHolidaySchedulesSupported() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43592,12 +45534,12 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params + [cluster subscribeAttributeNumberOfHolidaySchedulesSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + NSLog(@"DoorLock.NumberOfHolidaySchedulesSupported response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43606,29 +45548,27 @@ class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public S }; /* - * Attribute EndProductType + * Attribute MaxPINCodeLength */ -class ReadWindowCoveringEndProductType : public ReadAttribute { +class ReadDoorLockMaxPINCodeLength : public ReadAttribute { public: - ReadWindowCoveringEndProductType() - : ReadAttribute("end-product-type") + ReadDoorLockMaxPINCodeLength() + : ReadAttribute("max-pincode-length") { } - ~ReadWindowCoveringEndProductType() {} + ~ReadDoorLockMaxPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering EndProductType read Error", error); + LogNSError("DoorLock MaxPINCodeLength read Error", error); } SetCommandExitStatus(error); }]; @@ -43636,22 +45576,20 @@ class ReadWindowCoveringEndProductType : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { +class SubscribeAttributeDoorLockMaxPINCodeLength : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringEndProductType() - : SubscribeAttribute("end-product-type") + SubscribeAttributeDoorLockMaxPINCodeLength() + : SubscribeAttribute("max-pincode-length") { } - ~SubscribeAttributeWindowCoveringEndProductType() {} + ~SubscribeAttributeDoorLockMaxPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43662,12 +45600,12 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndProductTypeWithParams:params + [cluster subscribeAttributeMaxPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.EndProductType response %@", [value description]); + NSLog(@"DoorLock.MaxPINCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43676,53 +45614,48 @@ class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute }; /* - * Attribute CurrentPositionLiftPercent100ths + * Attribute MinPINCodeLength */ -class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { +class ReadDoorLockMinPINCodeLength : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionLiftPercent100ths() - : ReadAttribute("current-position-lift-percent100ths") + ReadDoorLockMinPINCodeLength() + : ReadAttribute("min-pincode-length") { } - ~ReadWindowCoveringCurrentPositionLiftPercent100ths() {} + ~ReadDoorLockMinPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock MinPINCodeLength read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { +class SubscribeAttributeDoorLockMinPINCodeLength : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() - : SubscribeAttribute("current-position-lift-percent100ths") + SubscribeAttributeDoorLockMinPINCodeLength() + : SubscribeAttribute("min-pincode-length") { } - ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() {} + ~SubscribeAttributeDoorLockMinPINCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000018) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43733,12 +45666,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params + [cluster subscribeAttributeMinPINCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + NSLog(@"DoorLock.MinPINCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43747,53 +45680,48 @@ class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public }; /* - * Attribute CurrentPositionTiltPercent100ths + * Attribute MaxRFIDCodeLength */ -class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { +class ReadDoorLockMaxRFIDCodeLength : public ReadAttribute { public: - ReadWindowCoveringCurrentPositionTiltPercent100ths() - : ReadAttribute("current-position-tilt-percent100ths") + ReadDoorLockMaxRFIDCodeLength() + : ReadAttribute("max-rfidcode-length") { } - ~ReadWindowCoveringCurrentPositionTiltPercent100ths() {} + ~ReadDoorLockMaxRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); - if (error != nil) { - LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock MaxRFIDCodeLength read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { +class SubscribeAttributeDoorLockMaxRFIDCodeLength : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() - : SubscribeAttribute("current-position-tilt-percent100ths") + SubscribeAttributeDoorLockMaxRFIDCodeLength() + : SubscribeAttribute("max-rfidcode-length") { } - ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() {} + ~SubscribeAttributeDoorLockMaxRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43804,12 +45732,12 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params + [cluster subscribeAttributeMaxRFIDCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + NSLog(@"DoorLock.MaxRFIDCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43818,29 +45746,27 @@ class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public }; /* - * Attribute InstalledOpenLimitLift + * Attribute MinRFIDCodeLength */ -class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { +class ReadDoorLockMinRFIDCodeLength : public ReadAttribute { public: - ReadWindowCoveringInstalledOpenLimitLift() - : ReadAttribute("installed-open-limit-lift") + ReadDoorLockMinRFIDCodeLength() + : ReadAttribute("min-rfidcode-length") { } - ~ReadWindowCoveringInstalledOpenLimitLift() {} + ~ReadDoorLockMinRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); + LogNSError("DoorLock MinRFIDCodeLength read Error", error); } SetCommandExitStatus(error); }]; @@ -43848,22 +45774,20 @@ class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { +class SubscribeAttributeDoorLockMinRFIDCodeLength : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledOpenLimitLift() - : SubscribeAttribute("installed-open-limit-lift") + SubscribeAttributeDoorLockMinRFIDCodeLength() + : SubscribeAttribute("min-rfidcode-length") { } - ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() {} + ~SubscribeAttributeDoorLockMinRFIDCodeLength() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43874,12 +45798,12 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params + [cluster subscribeAttributeMinRFIDCodeLengthWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); + NSLog(@"DoorLock.MinRFIDCodeLength response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43888,29 +45812,27 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeA }; /* - * Attribute InstalledClosedLimitLift + * Attribute CredentialRulesSupport */ -class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { +class ReadDoorLockCredentialRulesSupport : public ReadAttribute { public: - ReadWindowCoveringInstalledClosedLimitLift() - : ReadAttribute("installed-closed-limit-lift") + ReadDoorLockCredentialRulesSupport() + : ReadAttribute("credential-rules-support") { } - ~ReadWindowCoveringInstalledClosedLimitLift() {} + ~ReadDoorLockCredentialRulesSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCredentialRulesSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); + LogNSError("DoorLock CredentialRulesSupport read Error", error); } SetCommandExitStatus(error); }]; @@ -43918,22 +45840,20 @@ class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { +class SubscribeAttributeDoorLockCredentialRulesSupport : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledClosedLimitLift() - : SubscribeAttribute("installed-closed-limit-lift") + SubscribeAttributeDoorLockCredentialRulesSupport() + : SubscribeAttribute("credential-rules-support") { } - ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() {} + ~SubscribeAttributeDoorLockCredentialRulesSupport() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -43944,12 +45864,12 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params + [cluster subscribeAttributeCredentialRulesSupportWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); + NSLog(@"DoorLock.CredentialRulesSupport response %@", [value description]); SetCommandExitStatus(error); }]; @@ -43958,29 +45878,28 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public Subscrib }; /* - * Attribute InstalledOpenLimitTilt + * Attribute NumberOfCredentialsSupportedPerUser */ -class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { +class ReadDoorLockNumberOfCredentialsSupportedPerUser : public ReadAttribute { public: - ReadWindowCoveringInstalledOpenLimitTilt() - : ReadAttribute("installed-open-limit-tilt") + ReadDoorLockNumberOfCredentialsSupportedPerUser() + : ReadAttribute("number-of-credentials-supported-per-user") { } - ~ReadWindowCoveringInstalledOpenLimitTilt() {} + ~ReadDoorLockNumberOfCredentialsSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfCredentialsSupportedPerUserWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); + LogNSError("DoorLock NumberOfCredentialsSupportedPerUser read Error", error); } SetCommandExitStatus(error); }]; @@ -43988,22 +45907,20 @@ class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { +class SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() - : SubscribeAttribute("installed-open-limit-tilt") + SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() + : SubscribeAttribute("number-of-credentials-supported-per-user") { } - ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() {} + ~SubscribeAttributeDoorLockNumberOfCredentialsSupportedPerUser() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000001C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44014,12 +45931,12 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params + [cluster subscribeAttributeNumberOfCredentialsSupportedPerUserWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); + NSLog(@"DoorLock.NumberOfCredentialsSupportedPerUser response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44028,29 +45945,27 @@ class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeA }; /* - * Attribute InstalledClosedLimitTilt + * Attribute Language */ -class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { +class ReadDoorLockLanguage : public ReadAttribute { public: - ReadWindowCoveringInstalledClosedLimitTilt() - : ReadAttribute("installed-closed-limit-tilt") + ReadDoorLockLanguage() + : ReadAttribute("language") { } - ~ReadWindowCoveringInstalledClosedLimitTilt() {} + ~ReadDoorLockLanguage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLanguageWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + LogNSError("DoorLock Language read Error", error); } SetCommandExitStatus(error); }]; @@ -44058,22 +45973,60 @@ class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { +class WriteDoorLockLanguage : public WriteAttribute { public: - SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() - : SubscribeAttribute("installed-closed-limit-tilt") + WriteDoorLockLanguage() + : WriteAttribute("language") { + AddArgument("attr-name", "language"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() {} + ~WriteDoorLockLanguage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLanguageWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock Language write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeDoorLockLanguage : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockLanguage() + : SubscribeAttribute("language") + { + } + + ~SubscribeAttributeDoorLockLanguage() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000021) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44084,12 +46037,12 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params + [cluster subscribeAttributeLanguageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.Language response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44098,29 +46051,27 @@ class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public Subscrib }; /* - * Attribute Mode + * Attribute LEDSettings */ -class ReadWindowCoveringMode : public ReadAttribute { +class ReadDoorLockLEDSettings : public ReadAttribute { public: - ReadWindowCoveringMode() - : ReadAttribute("mode") + ReadDoorLockLEDSettings() + : ReadAttribute("ledsettings") { } - ~ReadWindowCoveringMode() {} + ~ReadDoorLockLEDSettings() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLEDSettingsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LEDSettings response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering Mode read Error", error); + LogNSError("DoorLock LEDSettings read Error", error); } SetCommandExitStatus(error); }]; @@ -44128,39 +46079,37 @@ class ReadWindowCoveringMode : public ReadAttribute { } }; -class WriteWindowCoveringMode : public WriteAttribute { +class WriteDoorLockLEDSettings : public WriteAttribute { public: - WriteWindowCoveringMode() - : WriteAttribute("mode") + WriteDoorLockLEDSettings() + : WriteAttribute("ledsettings") { - AddArgument("attr-name", "mode"); + AddArgument("attr-name", "ledsettings"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteWindowCoveringMode() {} + ~WriteDoorLockLEDSettings() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) WriteAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WindowCovering Mode write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLEDSettingsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LEDSettings write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -44168,22 +46117,20 @@ class WriteWindowCoveringMode : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { +class SubscribeAttributeDoorLockLEDSettings : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringMode() - : SubscribeAttribute("mode") + SubscribeAttributeDoorLockLEDSettings() + : SubscribeAttribute("ledsettings") { } - ~SubscribeAttributeWindowCoveringMode() {} + ~SubscribeAttributeDoorLockLEDSettings() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44194,12 +46141,12 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeModeWithParams:params + [cluster subscribeAttributeLEDSettingsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.Mode response %@", [value description]); + NSLog(@"DoorLock.LEDSettings response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44208,29 +46155,27 @@ class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { }; /* - * Attribute SafetyStatus + * Attribute AutoRelockTime */ -class ReadWindowCoveringSafetyStatus : public ReadAttribute { +class ReadDoorLockAutoRelockTime : public ReadAttribute { public: - ReadWindowCoveringSafetyStatus() - : ReadAttribute("safety-status") + ReadDoorLockAutoRelockTime() + : ReadAttribute("auto-relock-time") { } - ~ReadWindowCoveringSafetyStatus() {} + ~ReadDoorLockAutoRelockTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAutoRelockTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering SafetyStatus read Error", error); + LogNSError("DoorLock AutoRelockTime read Error", error); } SetCommandExitStatus(error); }]; @@ -44238,22 +46183,58 @@ class ReadWindowCoveringSafetyStatus : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { +class WriteDoorLockAutoRelockTime : public WriteAttribute { public: - SubscribeAttributeWindowCoveringSafetyStatus() - : SubscribeAttribute("safety-status") + WriteDoorLockAutoRelockTime() + : WriteAttribute("auto-relock-time") { + AddArgument("attr-name", "auto-relock-time"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringSafetyStatus() {} + ~WriteDoorLockAutoRelockTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000023) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeAutoRelockTimeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock AutoRelockTime write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeDoorLockAutoRelockTime : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockAutoRelockTime() + : SubscribeAttribute("auto-relock-time") + { + } + + ~SubscribeAttributeDoorLockAutoRelockTime() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000023) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44264,12 +46245,12 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSafetyStatusWithParams:params + [cluster subscribeAttributeAutoRelockTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + NSLog(@"DoorLock.AutoRelockTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44278,29 +46259,27 @@ class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute SoundVolume */ -class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { +class ReadDoorLockSoundVolume : public ReadAttribute { public: - ReadWindowCoveringGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDoorLockSoundVolume() + : ReadAttribute("sound-volume") { } - ~ReadWindowCoveringGeneratedCommandList() {} + ~ReadDoorLockSoundVolume() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoundVolumeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SoundVolume response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering GeneratedCommandList read Error", error); + LogNSError("DoorLock SoundVolume read Error", error); } SetCommandExitStatus(error); }]; @@ -44308,22 +46287,58 @@ class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { +class WriteDoorLockSoundVolume : public WriteAttribute { public: - SubscribeAttributeWindowCoveringGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteDoorLockSoundVolume() + : WriteAttribute("sound-volume") { + AddArgument("attr-name", "sound-volume"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringGeneratedCommandList() {} + ~WriteDoorLockSoundVolume() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSoundVolumeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SoundVolume write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockSoundVolume : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockSoundVolume() + : SubscribeAttribute("sound-volume") + { + } + + ~SubscribeAttributeDoorLockSoundVolume() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000024) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44334,12 +46349,12 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSoundVolumeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SoundVolume response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44348,29 +46363,27 @@ class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAtt }; /* - * Attribute AcceptedCommandList + * Attribute OperatingMode */ -class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { +class ReadDoorLockOperatingMode : public ReadAttribute { public: - ReadWindowCoveringAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDoorLockOperatingMode() + : ReadAttribute("operating-mode") { } - ~ReadWindowCoveringAcceptedCommandList() {} + ~ReadDoorLockOperatingMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OperatingMode response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering AcceptedCommandList read Error", error); + LogNSError("DoorLock OperatingMode read Error", error); } SetCommandExitStatus(error); }]; @@ -44378,22 +46391,58 @@ class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { +class WriteDoorLockOperatingMode : public WriteAttribute { public: - SubscribeAttributeWindowCoveringAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteDoorLockOperatingMode() + : WriteAttribute("operating-mode") { + AddArgument("attr-name", "operating-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringAcceptedCommandList() {} + ~WriteDoorLockOperatingMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOperatingModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock OperatingMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeDoorLockOperatingMode : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockOperatingMode() + : SubscribeAttribute("operating-mode") + { + } + + ~SubscribeAttributeDoorLockOperatingMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000025) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44404,12 +46453,12 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOperatingModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.OperatingMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44418,29 +46467,27 @@ class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttr }; /* - * Attribute AttributeList + * Attribute SupportedOperatingModes */ -class ReadWindowCoveringAttributeList : public ReadAttribute { +class ReadDoorLockSupportedOperatingModes : public ReadAttribute { public: - ReadWindowCoveringAttributeList() - : ReadAttribute("attribute-list") + ReadDoorLockSupportedOperatingModes() + : ReadAttribute("supported-operating-modes") { } - ~ReadWindowCoveringAttributeList() {} + ~ReadDoorLockSupportedOperatingModes() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedOperatingModesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering AttributeList read Error", error); + LogNSError("DoorLock SupportedOperatingModes read Error", error); } SetCommandExitStatus(error); }]; @@ -44448,22 +46495,20 @@ class ReadWindowCoveringAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { +class SubscribeAttributeDoorLockSupportedOperatingModes : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDoorLockSupportedOperatingModes() + : SubscribeAttribute("supported-operating-modes") { } - ~SubscribeAttributeWindowCoveringAttributeList() {} + ~SubscribeAttributeDoorLockSupportedOperatingModes() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44474,12 +46519,12 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeSupportedOperatingModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SupportedOperatingModes response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44488,29 +46533,27 @@ class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute DefaultConfigurationRegister */ -class ReadWindowCoveringFeatureMap : public ReadAttribute { +class ReadDoorLockDefaultConfigurationRegister : public ReadAttribute { public: - ReadWindowCoveringFeatureMap() - : ReadAttribute("feature-map") + ReadDoorLockDefaultConfigurationRegister() + : ReadAttribute("default-configuration-register") { } - ~ReadWindowCoveringFeatureMap() {} + ~ReadDoorLockDefaultConfigurationRegister() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultConfigurationRegisterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering FeatureMap read Error", error); + LogNSError("DoorLock DefaultConfigurationRegister read Error", error); } SetCommandExitStatus(error); }]; @@ -44518,22 +46561,20 @@ class ReadWindowCoveringFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDoorLockDefaultConfigurationRegister : public SubscribeAttribute { public: - SubscribeAttributeWindowCoveringFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDoorLockDefaultConfigurationRegister() + : SubscribeAttribute("default-configuration-register") { } - ~SubscribeAttributeWindowCoveringFeatureMap() {} + ~SubscribeAttributeDoorLockDefaultConfigurationRegister() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000027) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44544,12 +46585,12 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeDefaultConfigurationRegisterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.DefaultConfigurationRegister response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44558,29 +46599,27 @@ class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute EnableLocalProgramming */ -class ReadWindowCoveringClusterRevision : public ReadAttribute { +class ReadDoorLockEnableLocalProgramming : public ReadAttribute { public: - ReadWindowCoveringClusterRevision() - : ReadAttribute("cluster-revision") + ReadDoorLockEnableLocalProgramming() + : ReadAttribute("enable-local-programming") { } - ~ReadWindowCoveringClusterRevision() {} + ~ReadDoorLockEnableLocalProgramming() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnableLocalProgrammingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); if (error != nil) { - LogNSError("WindowCovering ClusterRevision read Error", error); + LogNSError("DoorLock EnableLocalProgramming read Error", error); } SetCommandExitStatus(error); }]; @@ -44588,22 +46627,58 @@ class ReadWindowCoveringClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { +class WriteDoorLockEnableLocalProgramming : public WriteAttribute { public: - SubscribeAttributeWindowCoveringClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteDoorLockEnableLocalProgramming() + : WriteAttribute("enable-local-programming") { + AddArgument("attr-name", "enable-local-programming"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeWindowCoveringClusterRevision() {} + ~WriteDoorLockEnableLocalProgramming() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnableLocalProgrammingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableLocalProgramming write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnableLocalProgramming : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnableLocalProgramming() + : SubscribeAttribute("enable-local-programming") + { + } + + ~SubscribeAttributeDoorLockEnableLocalProgramming() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000028) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44614,12 +46689,12 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEnableLocalProgrammingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.EnableLocalProgramming response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44627,170 +46702,87 @@ class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribut } }; -/*----------------------------------------------------------------------------*\ -| Cluster BarrierControl | 0x0103 | -|------------------------------------------------------------------------------| -| Commands: | | -| * BarrierControlGoToPercent | 0x00 | -| * BarrierControlStop | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * BarrierMovingState | 0x0001 | -| * BarrierSafetyStatus | 0x0002 | -| * BarrierCapabilities | 0x0003 | -| * BarrierOpenEvents | 0x0004 | -| * BarrierCloseEvents | 0x0005 | -| * BarrierCommandOpenEvents | 0x0006 | -| * BarrierCommandCloseEvents | 0x0007 | -| * BarrierOpenPeriod | 0x0008 | -| * BarrierClosePeriod | 0x0009 | -| * BarrierPosition | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command BarrierControlGoToPercent + * Attribute EnableOneTouchLocking */ -class BarrierControlBarrierControlGoToPercent : public ClusterCommand { +class ReadDoorLockEnableOneTouchLocking : public ReadAttribute { public: - BarrierControlBarrierControlGoToPercent() - : ClusterCommand("barrier-control-go-to-percent") + ReadDoorLockEnableOneTouchLocking() + : ReadAttribute("enable-one-touch-locking") { - AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); - ClusterCommand::AddArguments(); } + ~ReadDoorLockEnableOneTouchLocking() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.percentOpen = [NSNumber numberWithUnsignedChar:mRequest.percentOpen]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster barrierControlGoToPercentWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnableOneTouchLockingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); + if (error != nil) { + LogNSError("DoorLock EnableOneTouchLocking read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; }; -/* - * Command BarrierControlStop - */ -class BarrierControlBarrierControlStop : public ClusterCommand { +class WriteDoorLockEnableOneTouchLocking : public WriteAttribute { public: - BarrierControlBarrierControlStop() - : ClusterCommand("barrier-control-stop") + WriteDoorLockEnableOneTouchLocking() + : WriteAttribute("enable-one-touch-locking") { - ClusterCommand::AddArguments(); + AddArgument("attr-name", "enable-one-touch-locking"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } + ~WriteDoorLockEnableOneTouchLocking() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; - params.timedInvokeTimeoutMs + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster barrierControlStopWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnableOneTouchLockingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableOneTouchLocking write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: + bool mValue; }; -/* - * Attribute BarrierMovingState - */ -class ReadBarrierControlBarrierMovingState : public ReadAttribute { -public: - ReadBarrierControlBarrierMovingState() - : ReadAttribute("barrier-moving-state") - { - } - - ~ReadBarrierControlBarrierMovingState() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); - if (error != nil) { - LogNSError("BarrierControl BarrierMovingState read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttribute { +class SubscribeAttributeDoorLockEnableOneTouchLocking : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierMovingState() - : SubscribeAttribute("barrier-moving-state") + SubscribeAttributeDoorLockEnableOneTouchLocking() + : SubscribeAttribute("enable-one-touch-locking") { } - ~SubscribeAttributeBarrierControlBarrierMovingState() {} + ~SubscribeAttributeDoorLockEnableOneTouchLocking() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44801,12 +46793,12 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierMovingStateWithParams:params + [cluster subscribeAttributeEnableOneTouchLockingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); + NSLog(@"DoorLock.EnableOneTouchLocking response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44815,29 +46807,27 @@ class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttri }; /* - * Attribute BarrierSafetyStatus + * Attribute EnableInsideStatusLED */ -class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { +class ReadDoorLockEnableInsideStatusLED : public ReadAttribute { public: - ReadBarrierControlBarrierSafetyStatus() - : ReadAttribute("barrier-safety-status") + ReadDoorLockEnableInsideStatusLED() + : ReadAttribute("enable-inside-status-led") { } - ~ReadBarrierControlBarrierSafetyStatus() {} + ~ReadDoorLockEnableInsideStatusLED() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnableInsideStatusLEDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierSafetyStatus read Error", error); + LogNSError("DoorLock EnableInsideStatusLED read Error", error); } SetCommandExitStatus(error); }]; @@ -44845,22 +46835,58 @@ class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttribute { +class WriteDoorLockEnableInsideStatusLED : public WriteAttribute { public: - SubscribeAttributeBarrierControlBarrierSafetyStatus() - : SubscribeAttribute("barrier-safety-status") + WriteDoorLockEnableInsideStatusLED() + : WriteAttribute("enable-inside-status-led") { + AddArgument("attr-name", "enable-inside-status-led"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBarrierControlBarrierSafetyStatus() {} + ~WriteDoorLockEnableInsideStatusLED() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnableInsideStatusLEDWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnableInsideStatusLED write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnableInsideStatusLED : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnableInsideStatusLED() + : SubscribeAttribute("enable-inside-status-led") + { + } + + ~SubscribeAttributeDoorLockEnableInsideStatusLED() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44871,12 +46897,12 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierSafetyStatusWithParams:params + [cluster subscribeAttributeEnableInsideStatusLEDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); + NSLog(@"DoorLock.EnableInsideStatusLED response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44885,29 +46911,27 @@ class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttr }; /* - * Attribute BarrierCapabilities + * Attribute EnablePrivacyModeButton */ -class ReadBarrierControlBarrierCapabilities : public ReadAttribute { +class ReadDoorLockEnablePrivacyModeButton : public ReadAttribute { public: - ReadBarrierControlBarrierCapabilities() - : ReadAttribute("barrier-capabilities") + ReadDoorLockEnablePrivacyModeButton() + : ReadAttribute("enable-privacy-mode-button") { } - ~ReadBarrierControlBarrierCapabilities() {} + ~ReadDoorLockEnablePrivacyModeButton() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEnablePrivacyModeButtonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierCapabilities read Error", error); + LogNSError("DoorLock EnablePrivacyModeButton read Error", error); } SetCommandExitStatus(error); }]; @@ -44915,22 +46939,58 @@ class ReadBarrierControlBarrierCapabilities : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttribute { +class WriteDoorLockEnablePrivacyModeButton : public WriteAttribute { public: - SubscribeAttributeBarrierControlBarrierCapabilities() - : SubscribeAttribute("barrier-capabilities") + WriteDoorLockEnablePrivacyModeButton() + : WriteAttribute("enable-privacy-mode-button") { + AddArgument("attr-name", "enable-privacy-mode-button"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBarrierControlBarrierCapabilities() {} + ~WriteDoorLockEnablePrivacyModeButton() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; + + [cluster writeAttributeEnablePrivacyModeButtonWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock EnablePrivacyModeButton write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeDoorLockEnablePrivacyModeButton : public SubscribeAttribute { +public: + SubscribeAttributeDoorLockEnablePrivacyModeButton() + : SubscribeAttribute("enable-privacy-mode-button") + { + } + + ~SubscribeAttributeDoorLockEnablePrivacyModeButton() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -44941,12 +47001,12 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCapabilitiesWithParams:params + [cluster subscribeAttributeEnablePrivacyModeButtonWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); + NSLog(@"DoorLock.EnablePrivacyModeButton response %@", [value description]); SetCommandExitStatus(error); }]; @@ -44955,29 +47015,27 @@ class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttr }; /* - * Attribute BarrierOpenEvents + * Attribute LocalProgrammingFeatures */ -class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { +class ReadDoorLockLocalProgrammingFeatures : public ReadAttribute { public: - ReadBarrierControlBarrierOpenEvents() - : ReadAttribute("barrier-open-events") + ReadDoorLockLocalProgrammingFeatures() + : ReadAttribute("local-programming-features") { } - ~ReadBarrierControlBarrierOpenEvents() {} + ~ReadDoorLockLocalProgrammingFeatures() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalProgrammingFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents read Error", error); + LogNSError("DoorLock LocalProgrammingFeatures read Error", error); } SetCommandExitStatus(error); }]; @@ -44985,62 +47043,58 @@ class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { } }; -class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { +class WriteDoorLockLocalProgrammingFeatures : public WriteAttribute { public: - WriteBarrierControlBarrierOpenEvents() - : WriteAttribute("barrier-open-events") + WriteDoorLockLocalProgrammingFeatures() + : WriteAttribute("local-programming-features") { - AddArgument("attr-name", "barrier-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "local-programming-features"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBarrierControlBarrierOpenEvents() {} + ~WriteDoorLockLocalProgrammingFeatures() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeBarrierOpenEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLocalProgrammingFeaturesWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock LocalProgrammingFeatures write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockLocalProgrammingFeatures : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierOpenEvents() - : SubscribeAttribute("barrier-open-events") + SubscribeAttributeDoorLockLocalProgrammingFeatures() + : SubscribeAttribute("local-programming-features") { } - ~SubscribeAttributeBarrierControlBarrierOpenEvents() {} + ~SubscribeAttributeDoorLockLocalProgrammingFeatures() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000002C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45051,12 +47105,12 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierOpenEventsWithParams:params + [cluster subscribeAttributeLocalProgrammingFeaturesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); + NSLog(@"DoorLock.LocalProgrammingFeatures response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45065,29 +47119,27 @@ class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttrib }; /* - * Attribute BarrierCloseEvents + * Attribute WrongCodeEntryLimit */ -class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { +class ReadDoorLockWrongCodeEntryLimit : public ReadAttribute { public: - ReadBarrierControlBarrierCloseEvents() - : ReadAttribute("barrier-close-events") + ReadDoorLockWrongCodeEntryLimit() + : ReadAttribute("wrong-code-entry-limit") { } - ~ReadBarrierControlBarrierCloseEvents() {} + ~ReadDoorLockWrongCodeEntryLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWrongCodeEntryLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents read Error", error); + LogNSError("DoorLock WrongCodeEntryLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -45095,62 +47147,58 @@ class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { } }; -class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { +class WriteDoorLockWrongCodeEntryLimit : public WriteAttribute { public: - WriteBarrierControlBarrierCloseEvents() - : WriteAttribute("barrier-close-events") + WriteDoorLockWrongCodeEntryLimit() + : WriteAttribute("wrong-code-entry-limit") { - AddArgument("attr-name", "barrier-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "wrong-code-entry-limit"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBarrierControlBarrierCloseEvents() {} + ~WriteDoorLockWrongCodeEntryLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeBarrierCloseEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeWrongCodeEntryLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock WrongCodeEntryLimit write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockWrongCodeEntryLimit : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCloseEvents() - : SubscribeAttribute("barrier-close-events") + SubscribeAttributeDoorLockWrongCodeEntryLimit() + : SubscribeAttribute("wrong-code-entry-limit") { } - ~SubscribeAttributeBarrierControlBarrierCloseEvents() {} + ~SubscribeAttributeDoorLockWrongCodeEntryLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45161,12 +47209,12 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCloseEventsWithParams:params + [cluster subscribeAttributeWrongCodeEntryLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); + NSLog(@"DoorLock.WrongCodeEntryLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45175,29 +47223,27 @@ class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttri }; /* - * Attribute BarrierCommandOpenEvents + * Attribute UserCodeTemporaryDisableTime */ -class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { +class ReadDoorLockUserCodeTemporaryDisableTime : public ReadAttribute { public: - ReadBarrierControlBarrierCommandOpenEvents() - : ReadAttribute("barrier-command-open-events") + ReadDoorLockUserCodeTemporaryDisableTime() + : ReadAttribute("user-code-temporary-disable-time") { } - ~ReadBarrierControlBarrierCommandOpenEvents() {} + ~ReadDoorLockUserCodeTemporaryDisableTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUserCodeTemporaryDisableTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); + LogNSError("DoorLock UserCodeTemporaryDisableTime read Error", error); } SetCommandExitStatus(error); }]; @@ -45205,63 +47251,59 @@ class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { } }; -class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { +class WriteDoorLockUserCodeTemporaryDisableTime : public WriteAttribute { public: - WriteBarrierControlBarrierCommandOpenEvents() - : WriteAttribute("barrier-command-open-events") + WriteDoorLockUserCodeTemporaryDisableTime() + : WriteAttribute("user-code-temporary-disable-time") { - AddArgument("attr-name", "barrier-command-open-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "user-code-temporary-disable-time"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBarrierControlBarrierCommandOpenEvents() {} + ~WriteDoorLockUserCodeTemporaryDisableTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; [cluster - writeAttributeBarrierCommandOpenEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + writeAttributeUserCodeTemporaryDisableTimeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock UserCodeTemporaryDisableTime write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockUserCodeTemporaryDisableTime : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCommandOpenEvents() - : SubscribeAttribute("barrier-command-open-events") + SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() + : SubscribeAttribute("user-code-temporary-disable-time") { } - ~SubscribeAttributeBarrierControlBarrierCommandOpenEvents() {} + ~SubscribeAttributeDoorLockUserCodeTemporaryDisableTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45272,12 +47314,12 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params + [cluster subscribeAttributeUserCodeTemporaryDisableTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + NSLog(@"DoorLock.UserCodeTemporaryDisableTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45286,29 +47328,27 @@ class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public Subscrib }; /* - * Attribute BarrierCommandCloseEvents + * Attribute SendPINOverTheAir */ -class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { +class ReadDoorLockSendPINOverTheAir : public ReadAttribute { public: - ReadBarrierControlBarrierCommandCloseEvents() - : ReadAttribute("barrier-command-close-events") + ReadDoorLockSendPINOverTheAir() + : ReadAttribute("send-pinover-the-air") { } - ~ReadBarrierControlBarrierCommandCloseEvents() {} + ~ReadDoorLockSendPINOverTheAir() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSendPINOverTheAirWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); + LogNSError("DoorLock SendPINOverTheAir read Error", error); } SetCommandExitStatus(error); }]; @@ -45316,63 +47356,58 @@ class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { } }; -class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { +class WriteDoorLockSendPINOverTheAir : public WriteAttribute { public: - WriteBarrierControlBarrierCommandCloseEvents() - : WriteAttribute("barrier-command-close-events") + WriteDoorLockSendPINOverTheAir() + : WriteAttribute("send-pinover-the-air") { - AddArgument("attr-name", "barrier-command-close-events"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "send-pinover-the-air"); + AddArgument("attr-value", 0, 1, &mValue); WriteAttribute::AddArguments(); } - ~WriteBarrierControlBarrierCommandCloseEvents() {} + ~WriteDoorLockSendPINOverTheAir() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster - writeAttributeBarrierCommandCloseEventsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeSendPINOverTheAirWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock SendPINOverTheAir write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + bool mValue; }; -class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public SubscribeAttribute { +class SubscribeAttributeDoorLockSendPINOverTheAir : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierCommandCloseEvents() - : SubscribeAttribute("barrier-command-close-events") + SubscribeAttributeDoorLockSendPINOverTheAir() + : SubscribeAttribute("send-pinover-the-air") { } - ~SubscribeAttributeBarrierControlBarrierCommandCloseEvents() {} + ~SubscribeAttributeDoorLockSendPINOverTheAir() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45383,12 +47418,12 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params + [cluster subscribeAttributeSendPINOverTheAirWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); + NSLog(@"DoorLock.SendPINOverTheAir response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45397,29 +47432,27 @@ class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public Subscri }; /* - * Attribute BarrierOpenPeriod + * Attribute RequirePINforRemoteOperation */ -class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { +class ReadDoorLockRequirePINforRemoteOperation : public ReadAttribute { public: - ReadBarrierControlBarrierOpenPeriod() - : ReadAttribute("barrier-open-period") + ReadDoorLockRequirePINforRemoteOperation() + : ReadAttribute("require-pinfor-remote-operation") { } - ~ReadBarrierControlBarrierOpenPeriod() {} + ~ReadDoorLockRequirePINforRemoteOperation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRequirePINforRemoteOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod read Error", error); + LogNSError("DoorLock RequirePINforRemoteOperation read Error", error); } SetCommandExitStatus(error); }]; @@ -45427,62 +47460,59 @@ class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { } }; -class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { +class WriteDoorLockRequirePINforRemoteOperation : public WriteAttribute { public: - WriteBarrierControlBarrierOpenPeriod() - : WriteAttribute("barrier-open-period") + WriteDoorLockRequirePINforRemoteOperation() + : WriteAttribute("require-pinfor-remote-operation") { - AddArgument("attr-name", "barrier-open-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "require-pinfor-remote-operation"); + AddArgument("attr-value", 0, 1, &mValue); WriteAttribute::AddArguments(); } - ~WriteBarrierControlBarrierOpenPeriod() {} + ~WriteDoorLockRequirePINforRemoteOperation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithBool:mValue]; - [cluster writeAttributeBarrierOpenPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierOpenPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeRequirePINforRemoteOperationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock RequirePINforRemoteOperation write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + bool mValue; }; -class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttribute { +class SubscribeAttributeDoorLockRequirePINforRemoteOperation : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierOpenPeriod() - : SubscribeAttribute("barrier-open-period") + SubscribeAttributeDoorLockRequirePINforRemoteOperation() + : SubscribeAttribute("require-pinfor-remote-operation") { } - ~SubscribeAttributeBarrierControlBarrierOpenPeriod() {} + ~SubscribeAttributeDoorLockRequirePINforRemoteOperation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45493,12 +47523,12 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierOpenPeriodWithParams:params + [cluster subscribeAttributeRequirePINforRemoteOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); + NSLog(@"DoorLock.RequirePINforRemoteOperation response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45507,29 +47537,27 @@ class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttrib }; /* - * Attribute BarrierClosePeriod + * Attribute ExpiringUserTimeout */ -class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { +class ReadDoorLockExpiringUserTimeout : public ReadAttribute { public: - ReadBarrierControlBarrierClosePeriod() - : ReadAttribute("barrier-close-period") + ReadDoorLockExpiringUserTimeout() + : ReadAttribute("expiring-user-timeout") { } - ~ReadBarrierControlBarrierClosePeriod() {} + ~ReadDoorLockExpiringUserTimeout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExpiringUserTimeoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod read Error", error); + LogNSError("DoorLock ExpiringUserTimeout read Error", error); } SetCommandExitStatus(error); }]; @@ -45537,39 +47565,37 @@ class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { } }; -class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { +class WriteDoorLockExpiringUserTimeout : public WriteAttribute { public: - WriteBarrierControlBarrierClosePeriod() - : WriteAttribute("barrier-close-period") + WriteDoorLockExpiringUserTimeout() + : WriteAttribute("expiring-user-timeout") { - AddArgument("attr-name", "barrier-close-period"); + AddArgument("attr-name", "expiring-user-timeout"); AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBarrierControlBarrierClosePeriod() {} + ~WriteDoorLockExpiringUserTimeout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) WriteAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeBarrierClosePeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BarrierControl BarrierClosePeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeExpiringUserTimeoutWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("DoorLock ExpiringUserTimeout write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -45577,22 +47603,20 @@ class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { uint16_t mValue; }; -class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttribute { +class SubscribeAttributeDoorLockExpiringUserTimeout : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierClosePeriod() - : SubscribeAttribute("barrier-close-period") + SubscribeAttributeDoorLockExpiringUserTimeout() + : SubscribeAttribute("expiring-user-timeout") { } - ~SubscribeAttributeBarrierControlBarrierClosePeriod() {} + ~SubscribeAttributeDoorLockExpiringUserTimeout() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45603,12 +47627,12 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierClosePeriodWithParams:params + [cluster subscribeAttributeExpiringUserTimeoutWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); + NSLog(@"DoorLock.ExpiringUserTimeout response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45617,29 +47641,27 @@ class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttri }; /* - * Attribute BarrierPosition + * Attribute GeneratedCommandList */ -class ReadBarrierControlBarrierPosition : public ReadAttribute { +class ReadDoorLockGeneratedCommandList : public ReadAttribute { public: - ReadBarrierControlBarrierPosition() - : ReadAttribute("barrier-position") + ReadDoorLockGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBarrierControlBarrierPosition() {} + ~ReadDoorLockGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl BarrierPosition read Error", error); + LogNSError("DoorLock GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -45647,22 +47669,20 @@ class ReadBarrierControlBarrierPosition : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribute { +class SubscribeAttributeDoorLockGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlBarrierPosition() - : SubscribeAttribute("barrier-position") + SubscribeAttributeDoorLockGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBarrierControlBarrierPosition() {} + ~SubscribeAttributeDoorLockGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45673,12 +47693,12 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBarrierPositionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45687,29 +47707,27 @@ class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribut }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadBarrierControlGeneratedCommandList : public ReadAttribute { +class ReadDoorLockAcceptedCommandList : public ReadAttribute { public: - ReadBarrierControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDoorLockAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBarrierControlGeneratedCommandList() {} + ~ReadDoorLockAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl GeneratedCommandList read Error", error); + LogNSError("DoorLock AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -45717,22 +47735,20 @@ class ReadBarrierControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDoorLockAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeDoorLockAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBarrierControlGeneratedCommandList() {} + ~SubscribeAttributeDoorLockAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45743,12 +47759,12 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + NSLog(@"DoorLock.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45757,29 +47773,27 @@ class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAtt }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadBarrierControlAcceptedCommandList : public ReadAttribute { +class ReadDoorLockEventList : public ReadAttribute { public: - ReadBarrierControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDoorLockEventList() + : ReadAttribute("event-list") { } - ~ReadBarrierControlAcceptedCommandList() {} + ~ReadDoorLockEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DoorLock.EventList response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl AcceptedCommandList read Error", error); + LogNSError("DoorLock EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -45787,22 +47801,20 @@ class ReadBarrierControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDoorLockEventList : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDoorLockEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBarrierControlAcceptedCommandList() {} + ~SubscribeAttributeDoorLockEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45813,12 +47825,12 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); + NSLog(@"DoorLock.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45829,27 +47841,25 @@ class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttr /* * Attribute AttributeList */ -class ReadBarrierControlAttributeList : public ReadAttribute { +class ReadDoorLockAttributeList : public ReadAttribute { public: - ReadBarrierControlAttributeList() + ReadDoorLockAttributeList() : ReadAttribute("attribute-list") { } - ~ReadBarrierControlAttributeList() {} + ~ReadDoorLockAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AttributeList response %@", [value description]); + NSLog(@"DoorLock.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl AttributeList read Error", error); + LogNSError("DoorLock AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -45857,22 +47867,20 @@ class ReadBarrierControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeDoorLockAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlAttributeList() + SubscribeAttributeDoorLockAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBarrierControlAttributeList() {} + ~SubscribeAttributeDoorLockAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45888,7 +47896,7 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.AttributeList response %@", [value description]); + NSLog(@"DoorLock.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45899,27 +47907,25 @@ class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadBarrierControlFeatureMap : public ReadAttribute { +class ReadDoorLockFeatureMap : public ReadAttribute { public: - ReadBarrierControlFeatureMap() + ReadDoorLockFeatureMap() : ReadAttribute("feature-map") { } - ~ReadBarrierControlFeatureMap() {} + ~ReadDoorLockFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl FeatureMap read Error", error); + LogNSError("DoorLock FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -45927,22 +47933,20 @@ class ReadBarrierControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDoorLockFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlFeatureMap() + SubscribeAttributeDoorLockFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBarrierControlFeatureMap() {} + ~SubscribeAttributeDoorLockFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -45958,7 +47962,7 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.FeatureMap response %@", [value description]); + NSLog(@"DoorLock.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -45969,27 +47973,25 @@ class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadBarrierControlClusterRevision : public ReadAttribute { +class ReadDoorLockClusterRevision : public ReadAttribute { public: - ReadBarrierControlClusterRevision() + ReadDoorLockClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadBarrierControlClusterRevision() {} + ~ReadDoorLockClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("BarrierControl ClusterRevision read Error", error); + LogNSError("DoorLock ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -45997,22 +47999,20 @@ class ReadBarrierControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDoorLockClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBarrierControlClusterRevision() + SubscribeAttributeDoorLockClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBarrierControlClusterRevision() {} + ~SubscribeAttributeDoorLockClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000101) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46028,7 +48028,7 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); + NSLog(@"DoorLock.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46037,34 +48037,40 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut }; /*----------------------------------------------------------------------------*\ -| Cluster PumpConfigurationAndControl | 0x0200 | +| Cluster WindowCovering | 0x0102 | |------------------------------------------------------------------------------| | Commands: | | +| * UpOrOpen | 0x00 | +| * DownOrClose | 0x01 | +| * StopMotion | 0x02 | +| * GoToLiftValue | 0x04 | +| * GoToLiftPercentage | 0x05 | +| * GoToTiltValue | 0x07 | +| * GoToTiltPercentage | 0x08 | |------------------------------------------------------------------------------| | Attributes: | | -| * MaxPressure | 0x0000 | -| * MaxSpeed | 0x0001 | -| * MaxFlow | 0x0002 | -| * MinConstPressure | 0x0003 | -| * MaxConstPressure | 0x0004 | -| * MinCompPressure | 0x0005 | -| * MaxCompPressure | 0x0006 | -| * MinConstSpeed | 0x0007 | -| * MaxConstSpeed | 0x0008 | -| * MinConstFlow | 0x0009 | -| * MaxConstFlow | 0x000A | -| * MinConstTemp | 0x000B | -| * MaxConstTemp | 0x000C | -| * PumpStatus | 0x0010 | -| * EffectiveOperationMode | 0x0011 | -| * EffectiveControlMode | 0x0012 | -| * Capacity | 0x0013 | -| * Speed | 0x0014 | -| * LifetimeRunningHours | 0x0015 | -| * Power | 0x0016 | -| * LifetimeEnergyConsumed | 0x0017 | -| * OperationMode | 0x0020 | -| * ControlMode | 0x0021 | +| * Type | 0x0000 | +| * PhysicalClosedLimitLift | 0x0001 | +| * PhysicalClosedLimitTilt | 0x0002 | +| * CurrentPositionLift | 0x0003 | +| * CurrentPositionTilt | 0x0004 | +| * NumberOfActuationsLift | 0x0005 | +| * NumberOfActuationsTilt | 0x0006 | +| * ConfigStatus | 0x0007 | +| * CurrentPositionLiftPercentage | 0x0008 | +| * CurrentPositionTiltPercentage | 0x0009 | +| * OperationalStatus | 0x000A | +| * TargetPositionLiftPercent100ths | 0x000B | +| * TargetPositionTiltPercent100ths | 0x000C | +| * EndProductType | 0x000D | +| * CurrentPositionLiftPercent100ths | 0x000E | +| * CurrentPositionTiltPercent100ths | 0x000F | +| * InstalledOpenLimitLift | 0x0010 | +| * InstalledClosedLimitLift | 0x0011 | +| * InstalledOpenLimitTilt | 0x0012 | +| * InstalledClosedLimitTilt | 0x0013 | +| * Mode | 0x0017 | +| * SafetyStatus | 0x001A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -46073,282 +48079,368 @@ class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribut | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * SupplyVoltageLow | 0x0000 | -| * SupplyVoltageHigh | 0x0001 | -| * PowerMissingPhase | 0x0002 | -| * SystemPressureLow | 0x0003 | -| * SystemPressureHigh | 0x0004 | -| * DryRunning | 0x0005 | -| * MotorTemperatureHigh | 0x0006 | -| * PumpMotorFatalFailure | 0x0007 | -| * ElectronicTemperatureHigh | 0x0008 | -| * PumpBlocked | 0x0009 | -| * SensorFailure | 0x000A | -| * ElectronicNonFatalFailure | 0x000B | -| * ElectronicFatalFailure | 0x000C | -| * GeneralFault | 0x000D | -| * Leakage | 0x000E | -| * AirDetection | 0x000F | -| * TurbineOperation | 0x0010 | \*----------------------------------------------------------------------------*/ /* - * Attribute MaxPressure + * Command UpOrOpen */ -class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { +class WindowCoveringUpOrOpen : public ClusterCommand { public: - ReadPumpConfigurationAndControlMaxPressure() - : ReadAttribute("max-pressure") + WindowCoveringUpOrOpen() + : ClusterCommand("up-or-open") { + ClusterCommand::AddArguments(); } - ~ReadPumpConfigurationAndControlMaxPressure() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster upOrOpenWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { +/* + * Command DownOrClose + */ +class WindowCoveringDownOrClose : public ClusterCommand { public: - SubscribeAttributePumpConfigurationAndControlMaxPressure() - : SubscribeAttribute("max-pressure") + WindowCoveringDownOrClose() + : ClusterCommand("down-or-close") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMaxPressure() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster downOrCloseWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMaxPressureWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute MaxSpeed + * Command StopMotion */ -class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { +class WindowCoveringStopMotion : public ClusterCommand { public: - ReadPumpConfigurationAndControlMaxSpeed() - : ReadAttribute("max-speed") + WindowCoveringStopMotion() + : ClusterCommand("stop-motion") { + ClusterCommand::AddArguments(); } - ~ReadPumpConfigurationAndControlMaxSpeed() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopMotionWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { +/* + * Command GoToLiftValue + */ +class WindowCoveringGoToLiftValue : public ClusterCommand { public: - SubscribeAttributePumpConfigurationAndControlMaxSpeed() - : SubscribeAttribute("max-speed") + WindowCoveringGoToLiftValue() + : ClusterCommand("go-to-lift-value") { + AddArgument("LiftValue", 0, UINT16_MAX, &mRequest.liftValue); + ClusterCommand::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftValue = [NSNumber numberWithUnsignedShort:mRequest.liftValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMaxSpeedWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type mRequest; }; /* - * Attribute MaxFlow + * Command GoToLiftPercentage */ -class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { +class WindowCoveringGoToLiftPercentage : public ClusterCommand { public: - ReadPumpConfigurationAndControlMaxFlow() - : ReadAttribute("max-flow") + WindowCoveringGoToLiftPercentage() + : ClusterCommand("go-to-lift-percentage") { + AddArgument("LiftPercent100thsValue", 0, UINT16_MAX, &mRequest.liftPercent100thsValue); + ClusterCommand::AddArguments(); } - ~ReadPumpConfigurationAndControlMaxFlow() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.liftPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.liftPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToLiftPercentageWithParams:params + completion:^(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::WindowCovering::Commands::GoToLiftPercentage::Type mRequest; }; -class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { +/* + * Command GoToTiltValue + */ +class WindowCoveringGoToTiltValue : public ClusterCommand { public: - SubscribeAttributePumpConfigurationAndControlMaxFlow() - : SubscribeAttribute("max-flow") + WindowCoveringGoToTiltValue() + : ClusterCommand("go-to-tilt-value") { + AddArgument("TiltValue", 0, UINT16_MAX, &mRequest.tiltValue); + ClusterCommand::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMaxFlow() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltValue = [NSNumber numberWithUnsignedShort:mRequest.tiltValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltValueWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMaxFlowWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type mRequest; }; /* - * Attribute MinConstPressure + * Command GoToTiltPercentage */ -class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { +class WindowCoveringGoToTiltPercentage : public ClusterCommand { public: - ReadPumpConfigurationAndControlMinConstPressure() - : ReadAttribute("min-const-pressure") + WindowCoveringGoToTiltPercentage() + : ClusterCommand("go-to-tilt-percentage") { + AddArgument("TiltPercent100thsValue", 0, UINT16_MAX, &mRequest.tiltPercent100thsValue); + ClusterCommand::AddArguments(); } - ~ReadPumpConfigurationAndControlMinConstPressure() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tiltPercent100thsValue = [NSNumber numberWithUnsignedShort:mRequest.tiltPercent100thsValue]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster goToTiltPercentageWithParams:params + completion:^(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::WindowCovering::Commands::GoToTiltPercentage::Type mRequest; }; -class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { +/* + * Attribute Type + */ +class ReadWindowCoveringType : public ReadAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstPressure() - : SubscribeAttribute("min-const-pressure") + ReadWindowCoveringType() + : ReadAttribute("type") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() {} + ~ReadWindowCoveringType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Type response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering Type read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWindowCoveringType : public SubscribeAttribute { +public: + SubscribeAttributeWindowCoveringType() + : SubscribeAttribute("type") + { + } + + ~SubscribeAttributeWindowCoveringType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46359,12 +48451,12 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstPressureWithParams:params + [cluster subscribeAttributeTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); + NSLog(@"WindowCovering.Type response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46373,29 +48465,29 @@ class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public Sub }; /* - * Attribute MaxConstPressure + * Attribute PhysicalClosedLimitLift */ -class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitLift : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstPressure() - : ReadAttribute("max-const-pressure") + ReadWindowCoveringPhysicalClosedLimitLift() + : ReadAttribute("physical-closed-limit-lift") { } - ~ReadPumpConfigurationAndControlMaxConstPressure() {} + ~ReadWindowCoveringPhysicalClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); + LogNSError("WindowCovering PhysicalClosedLimitLift read Error", error); } SetCommandExitStatus(error); }]; @@ -46403,22 +48495,22 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstPressure() - : SubscribeAttribute("max-const-pressure") + SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() + : SubscribeAttribute("physical-closed-limit-lift") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() {} + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46429,12 +48521,12 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstPressureWithParams:params + [cluster subscribeAttributePhysicalClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + NSLog(@"WindowCovering.PhysicalClosedLimitLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46443,29 +48535,29 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub }; /* - * Attribute MinCompPressure + * Attribute PhysicalClosedLimitTilt */ -class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { +class ReadWindowCoveringPhysicalClosedLimitTilt : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinCompPressure() - : ReadAttribute("min-comp-pressure") + ReadWindowCoveringPhysicalClosedLimitTilt() + : ReadAttribute("physical-closed-limit-tilt") { } - ~ReadPumpConfigurationAndControlMinCompPressure() {} + ~ReadWindowCoveringPhysicalClosedLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + LogNSError("WindowCovering PhysicalClosedLimitTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -46473,22 +48565,22 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinCompPressure() - : SubscribeAttribute("min-comp-pressure") + SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() + : SubscribeAttribute("physical-closed-limit-tilt") { } - ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() {} + ~SubscribeAttributeWindowCoveringPhysicalClosedLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46499,12 +48591,12 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCompPressureWithParams:params + [cluster subscribeAttributePhysicalClosedLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + NSLog(@"WindowCovering.PhysicalClosedLimitTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46513,29 +48605,29 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs }; /* - * Attribute MaxCompPressure + * Attribute CurrentPositionLift */ -class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLift : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxCompPressure() - : ReadAttribute("max-comp-pressure") + ReadWindowCoveringCurrentPositionLift() + : ReadAttribute("current-position-lift") { } - ~ReadPumpConfigurationAndControlMaxCompPressure() {} + ~ReadWindowCoveringCurrentPositionLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); + LogNSError("WindowCovering CurrentPositionLift read Error", error); } SetCommandExitStatus(error); }]; @@ -46543,22 +48635,22 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLift : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxCompPressure() - : SubscribeAttribute("max-comp-pressure") + SubscribeAttributeWindowCoveringCurrentPositionLift() + : SubscribeAttribute("current-position-lift") { } - ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() {} + ~SubscribeAttributeWindowCoveringCurrentPositionLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46569,12 +48661,12 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCompPressureWithParams:params + [cluster subscribeAttributeCurrentPositionLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46583,29 +48675,29 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs }; /* - * Attribute MinConstSpeed + * Attribute CurrentPositionTilt */ -class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTilt : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstSpeed() - : ReadAttribute("min-const-speed") + ReadWindowCoveringCurrentPositionTilt() + : ReadAttribute("current-position-tilt") { } - ~ReadPumpConfigurationAndControlMinConstSpeed() {} + ~ReadWindowCoveringCurrentPositionTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); + LogNSError("WindowCovering CurrentPositionTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -46613,22 +48705,22 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTilt : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstSpeed() - : SubscribeAttribute("min-const-speed") + SubscribeAttributeWindowCoveringCurrentPositionTilt() + : SubscribeAttribute("current-position-tilt") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() {} + ~SubscribeAttributeWindowCoveringCurrentPositionTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46639,12 +48731,12 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstSpeedWithParams:params + [cluster subscribeAttributeCurrentPositionTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46653,29 +48745,29 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr }; /* - * Attribute MaxConstSpeed + * Attribute NumberOfActuationsLift */ -class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsLift : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstSpeed() - : ReadAttribute("max-const-speed") + ReadWindowCoveringNumberOfActuationsLift() + : ReadAttribute("number-of-actuations-lift") { } - ~ReadPumpConfigurationAndControlMaxConstSpeed() {} + ~ReadWindowCoveringNumberOfActuationsLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); + LogNSError("WindowCovering NumberOfActuationsLift read Error", error); } SetCommandExitStatus(error); }]; @@ -46683,22 +48775,22 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsLift : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() - : SubscribeAttribute("max-const-speed") + SubscribeAttributeWindowCoveringNumberOfActuationsLift() + : SubscribeAttribute("number-of-actuations-lift") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() {} + ~SubscribeAttributeWindowCoveringNumberOfActuationsLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46709,12 +48801,12 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstSpeedWithParams:params + [cluster subscribeAttributeNumberOfActuationsLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + NSLog(@"WindowCovering.NumberOfActuationsLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46723,29 +48815,29 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr }; /* - * Attribute MinConstFlow + * Attribute NumberOfActuationsTilt */ -class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { +class ReadWindowCoveringNumberOfActuationsTilt : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstFlow() - : ReadAttribute("min-const-flow") + ReadWindowCoveringNumberOfActuationsTilt() + : ReadAttribute("number-of-actuations-tilt") { } - ~ReadPumpConfigurationAndControlMinConstFlow() {} + ~ReadWindowCoveringNumberOfActuationsTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfActuationsTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); + LogNSError("WindowCovering NumberOfActuationsTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -46753,22 +48845,22 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringNumberOfActuationsTilt : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstFlow() - : SubscribeAttribute("min-const-flow") + SubscribeAttributeWindowCoveringNumberOfActuationsTilt() + : SubscribeAttribute("number-of-actuations-tilt") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() {} + ~SubscribeAttributeWindowCoveringNumberOfActuationsTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46779,12 +48871,12 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstFlowWithParams:params + [cluster subscribeAttributeNumberOfActuationsTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + NSLog(@"WindowCovering.NumberOfActuationsTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46793,29 +48885,29 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri }; /* - * Attribute MaxConstFlow + * Attribute ConfigStatus */ -class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { +class ReadWindowCoveringConfigStatus : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstFlow() - : ReadAttribute("max-const-flow") + ReadWindowCoveringConfigStatus() + : ReadAttribute("config-status") { } - ~ReadPumpConfigurationAndControlMaxConstFlow() {} + ~ReadWindowCoveringConfigStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeConfigStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + LogNSError("WindowCovering ConfigStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -46823,22 +48915,22 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringConfigStatus : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstFlow() - : SubscribeAttribute("max-const-flow") + SubscribeAttributeWindowCoveringConfigStatus() + : SubscribeAttribute("config-status") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() {} + ~SubscribeAttributeWindowCoveringConfigStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46849,12 +48941,12 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstFlowWithParams:params + [cluster subscribeAttributeConfigStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + NSLog(@"WindowCovering.ConfigStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46863,29 +48955,29 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri }; /* - * Attribute MinConstTemp + * Attribute CurrentPositionLiftPercentage */ -class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercentage : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstTemp() - : ReadAttribute("min-const-temp") + ReadWindowCoveringCurrentPositionLiftPercentage() + : ReadAttribute("current-position-lift-percentage") { } - ~ReadPumpConfigurationAndControlMinConstTemp() {} + ~ReadWindowCoveringCurrentPositionLiftPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionLiftPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + LogNSError("WindowCovering CurrentPositionLiftPercentage read Error", error); } SetCommandExitStatus(error); }]; @@ -46893,22 +48985,22 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstTemp() - : SubscribeAttribute("min-const-temp") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() + : SubscribeAttribute("current-position-lift-percentage") { } - ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() {} + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46919,12 +49011,12 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstTempWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLiftPercentage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -46933,29 +49025,29 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri }; /* - * Attribute MaxConstTemp + * Attribute CurrentPositionTiltPercentage */ -class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercentage : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstTemp() - : ReadAttribute("max-const-temp") + ReadWindowCoveringCurrentPositionTiltPercentage() + : ReadAttribute("current-position-tilt-percentage") { } - ~ReadPumpConfigurationAndControlMaxConstTemp() {} + ~ReadWindowCoveringCurrentPositionTiltPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentPositionTiltPercentageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); + LogNSError("WindowCovering CurrentPositionTiltPercentage read Error", error); } SetCommandExitStatus(error); }]; @@ -46963,22 +49055,22 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstTemp() - : SubscribeAttribute("max-const-temp") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() + : SubscribeAttribute("current-position-tilt-percentage") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() {} + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercentage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -46989,12 +49081,12 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstTempWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercentageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionTiltPercentage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47003,29 +49095,29 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri }; /* - * Attribute PumpStatus + * Attribute OperationalStatus */ -class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { +class ReadWindowCoveringOperationalStatus : public ReadAttribute { public: - ReadPumpConfigurationAndControlPumpStatus() - : ReadAttribute("pump-status") + ReadWindowCoveringOperationalStatus() + : ReadAttribute("operational-status") { } - ~ReadPumpConfigurationAndControlPumpStatus() {} + ~ReadWindowCoveringOperationalStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOperationalStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); + LogNSError("WindowCovering OperationalStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -47033,22 +49125,22 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringOperationalStatus : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlPumpStatus() - : SubscribeAttribute("pump-status") + SubscribeAttributeWindowCoveringOperationalStatus() + : SubscribeAttribute("operational-status") { } - ~SubscribeAttributePumpConfigurationAndControlPumpStatus() {} + ~SubscribeAttributeWindowCoveringOperationalStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47059,12 +49151,12 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePumpStatusWithParams:params + [cluster subscribeAttributeOperationalStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + NSLog(@"WindowCovering.OperationalStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47073,52 +49165,53 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe }; /* - * Attribute EffectiveOperationMode + * Attribute TargetPositionLiftPercent100ths */ -class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { +class ReadWindowCoveringTargetPositionLiftPercent100ths : public ReadAttribute { public: - ReadPumpConfigurationAndControlEffectiveOperationMode() - : ReadAttribute("effective-operation-mode") + ReadWindowCoveringTargetPositionLiftPercent100ths() + : ReadAttribute("target-position-lift-percent100ths") { } - ~ReadPumpConfigurationAndControlEffectiveOperationMode() {} + ~ReadWindowCoveringTargetPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeTargetPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering TargetPositionLiftPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() - : SubscribeAttribute("effective-operation-mode") + SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() + : SubscribeAttribute("target-position-lift-percent100ths") { } - ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() {} + ~SubscribeAttributeWindowCoveringTargetPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47129,12 +49222,12 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEffectiveOperationModeWithParams:params + [cluster subscribeAttributeTargetPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + NSLog(@"WindowCovering.TargetPositionLiftPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47143,52 +49236,53 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ }; /* - * Attribute EffectiveControlMode + * Attribute TargetPositionTiltPercent100ths */ -class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { +class ReadWindowCoveringTargetPositionTiltPercent100ths : public ReadAttribute { public: - ReadPumpConfigurationAndControlEffectiveControlMode() - : ReadAttribute("effective-control-mode") + ReadWindowCoveringTargetPositionTiltPercent100ths() + : ReadAttribute("target-position-tilt-percent100ths") { } - ~ReadPumpConfigurationAndControlEffectiveControlMode() {} + ~ReadWindowCoveringTargetPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeTargetPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering TargetPositionTiltPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() - : SubscribeAttribute("effective-control-mode") + SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() + : SubscribeAttribute("target-position-tilt-percent100ths") { } - ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() {} + ~SubscribeAttributeWindowCoveringTargetPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47199,12 +49293,12 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEffectiveControlModeWithParams:params + [cluster subscribeAttributeTargetPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + NSLog(@"WindowCovering.TargetPositionTiltPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47213,29 +49307,29 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public }; /* - * Attribute Capacity + * Attribute EndProductType */ -class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { +class ReadWindowCoveringEndProductType : public ReadAttribute { public: - ReadPumpConfigurationAndControlCapacity() - : ReadAttribute("capacity") + ReadWindowCoveringEndProductType() + : ReadAttribute("end-product-type") { } - ~ReadPumpConfigurationAndControlCapacity() {} + ~ReadWindowCoveringEndProductType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEndProductTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EndProductType response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl Capacity read Error", error); + LogNSError("WindowCovering EndProductType read Error", error); } SetCommandExitStatus(error); }]; @@ -47243,22 +49337,22 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringEndProductType : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlCapacity() - : SubscribeAttribute("capacity") + SubscribeAttributeWindowCoveringEndProductType() + : SubscribeAttribute("end-product-type") { } - ~SubscribeAttributePumpConfigurationAndControlCapacity() {} + ~SubscribeAttributeWindowCoveringEndProductType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47269,12 +49363,12 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCapacityWithParams:params + [cluster subscribeAttributeEndProductTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + NSLog(@"WindowCovering.EndProductType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47283,52 +49377,53 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt }; /* - * Attribute Speed + * Attribute CurrentPositionLiftPercent100ths */ -class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { +class ReadWindowCoveringCurrentPositionLiftPercent100ths : public ReadAttribute { public: - ReadPumpConfigurationAndControlSpeed() - : ReadAttribute("speed") + ReadWindowCoveringCurrentPositionLiftPercent100ths() + : ReadAttribute("current-position-lift-percent100ths") { } - ~ReadPumpConfigurationAndControlSpeed() {} + ~ReadWindowCoveringCurrentPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl Speed read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeCurrentPositionLiftPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering CurrentPositionLiftPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlSpeed() - : SubscribeAttribute("speed") + SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() + : SubscribeAttribute("current-position-lift-percent100ths") { } - ~SubscribeAttributePumpConfigurationAndControlSpeed() {} + ~SubscribeAttributeWindowCoveringCurrentPositionLiftPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47339,12 +49434,12 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedWithParams:params + [cluster subscribeAttributeCurrentPositionLiftPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionLiftPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47353,93 +49448,53 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri }; /* - * Attribute LifetimeRunningHours + * Attribute CurrentPositionTiltPercent100ths */ -class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { +class ReadWindowCoveringCurrentPositionTiltPercent100ths : public ReadAttribute { public: - ReadPumpConfigurationAndControlLifetimeRunningHours() - : ReadAttribute("lifetime-running-hours") + ReadWindowCoveringCurrentPositionTiltPercent100ths() + : ReadAttribute("current-position-tilt-percent100ths") { } - ~ReadPumpConfigurationAndControlLifetimeRunningHours() {} + ~ReadWindowCoveringCurrentPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000015) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { -public: - WritePumpConfigurationAndControlLifetimeRunningHours() - : WriteAttribute("lifetime-running-hours") - { - AddArgument("attr-name", "lifetime-running-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlLifetimeRunningHours() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000000F) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeLifetimeRunningHoursWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", - error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeCurrentPositionTiltPercent100thsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering CurrentPositionTiltPercent100ths read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() - : SubscribeAttribute("lifetime-running-hours") + SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() + : SubscribeAttribute("current-position-tilt-percent100ths") { } - ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() {} + ~SubscribeAttributeWindowCoveringCurrentPositionTiltPercent100ths() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47450,12 +49505,12 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLifetimeRunningHoursWithParams:params + [cluster subscribeAttributeCurrentPositionTiltPercent100thsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); + NSLog(@"WindowCovering.CurrentPositionTiltPercent100ths response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47464,29 +49519,29 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public }; /* - * Attribute Power + * Attribute InstalledOpenLimitLift */ -class ReadPumpConfigurationAndControlPower : public ReadAttribute { +class ReadWindowCoveringInstalledOpenLimitLift : public ReadAttribute { public: - ReadPumpConfigurationAndControlPower() - : ReadAttribute("power") + ReadWindowCoveringInstalledOpenLimitLift() + : ReadAttribute("installed-open-limit-lift") { } - ~ReadPumpConfigurationAndControlPower() {} + ~ReadWindowCoveringInstalledOpenLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl Power read Error", error); + LogNSError("WindowCovering InstalledOpenLimitLift read Error", error); } SetCommandExitStatus(error); }]; @@ -47494,22 +49549,22 @@ class ReadPumpConfigurationAndControlPower : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledOpenLimitLift : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlPower() - : SubscribeAttribute("power") + SubscribeAttributeWindowCoveringInstalledOpenLimitLift() + : SubscribeAttribute("installed-open-limit-lift") { } - ~SubscribeAttributePumpConfigurationAndControlPower() {} + ~SubscribeAttributeWindowCoveringInstalledOpenLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47520,12 +49575,12 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerWithParams:params + [cluster subscribeAttributeInstalledOpenLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); + NSLog(@"WindowCovering.InstalledOpenLimitLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47534,29 +49589,29 @@ class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttri }; /* - * Attribute LifetimeEnergyConsumed + * Attribute InstalledClosedLimitLift */ -class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { +class ReadWindowCoveringInstalledClosedLimitLift : public ReadAttribute { public: - ReadPumpConfigurationAndControlLifetimeEnergyConsumed() - : ReadAttribute("lifetime-energy-consumed") + ReadWindowCoveringInstalledClosedLimitLift() + : ReadAttribute("installed-closed-limit-lift") { } - ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() {} + ~ReadWindowCoveringInstalledClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledClosedLimitLiftWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); + LogNSError("WindowCovering InstalledClosedLimitLift read Error", error); } SetCommandExitStatus(error); }]; @@ -47564,64 +49619,22 @@ class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribu } }; -class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { -public: - WritePumpConfigurationAndControlLifetimeEnergyConsumed() - : WriteAttribute("lifetime-energy-consumed") - { - AddArgument("attr-name", "lifetime-energy-consumed"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster - writeAttributeLifetimeEnergyConsumedWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledClosedLimitLift : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() - : SubscribeAttribute("lifetime-energy-consumed") + SubscribeAttributeWindowCoveringInstalledClosedLimitLift() + : SubscribeAttribute("installed-closed-limit-lift") { } - ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() {} + ~SubscribeAttributeWindowCoveringInstalledClosedLimitLift() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47632,12 +49645,12 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params + [cluster subscribeAttributeInstalledClosedLimitLiftWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + NSLog(@"WindowCovering.InstalledClosedLimitLift response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47646,29 +49659,29 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ }; /* - * Attribute OperationMode + * Attribute InstalledOpenLimitTilt */ -class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { +class ReadWindowCoveringInstalledOpenLimitTilt : public ReadAttribute { public: - ReadPumpConfigurationAndControlOperationMode() - : ReadAttribute("operation-mode") + ReadWindowCoveringInstalledOpenLimitTilt() + : ReadAttribute("installed-open-limit-tilt") { } - ~ReadPumpConfigurationAndControlOperationMode() {} + ~ReadWindowCoveringInstalledOpenLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledOpenLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode read Error", error); + LogNSError("WindowCovering InstalledOpenLimitTilt read Error", error); } SetCommandExitStatus(error); }]; @@ -47676,62 +49689,22 @@ class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { } }; -class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { -public: - WritePumpConfigurationAndControlOperationMode() - : WriteAttribute("operation-mode") - { - AddArgument("attr-name", "operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlOperationMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000020) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOperationModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringInstalledOpenLimitTilt : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlOperationMode() - : SubscribeAttribute("operation-mode") + SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() + : SubscribeAttribute("installed-open-limit-tilt") { } - ~SubscribeAttributePumpConfigurationAndControlOperationMode() {} + ~SubscribeAttributeWindowCoveringInstalledOpenLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47742,12 +49715,12 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationModeWithParams:params + [cluster subscribeAttributeInstalledOpenLimitTiltWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + NSLog(@"WindowCovering.InstalledOpenLimitTilt response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47756,69 +49729,139 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr }; /* - * Attribute ControlMode + * Attribute InstalledClosedLimitTilt */ -class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { +class ReadWindowCoveringInstalledClosedLimitTilt : public ReadAttribute { public: - ReadPumpConfigurationAndControlControlMode() - : ReadAttribute("control-mode") + ReadWindowCoveringInstalledClosedLimitTilt() + : ReadAttribute("installed-closed-limit-tilt") { } - ~ReadPumpConfigurationAndControlControlMode() {} + ~ReadWindowCoveringInstalledClosedLimitTilt() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); - if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode read Error", error); - } + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInstalledClosedLimitTiltWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering InstalledClosedLimitTilt read Error", error); + } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } }; -class WritePumpConfigurationAndControlControlMode : public WriteAttribute { +class SubscribeAttributeWindowCoveringInstalledClosedLimitTilt : public SubscribeAttribute { public: - WritePumpConfigurationAndControlControlMode() - : WriteAttribute("control-mode") + SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() + : SubscribeAttribute("installed-closed-limit-tilt") { - AddArgument("attr-name", "control-mode"); + } + + ~SubscribeAttributeWindowCoveringInstalledClosedLimitTilt() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000013) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeInstalledClosedLimitTiltWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.InstalledClosedLimitTilt response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute Mode + */ +class ReadWindowCoveringMode : public ReadAttribute { +public: + ReadWindowCoveringMode() + : ReadAttribute("mode") + { + } + + ~ReadWindowCoveringMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x00000017) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.Mode response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering Mode read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteWindowCoveringMode : public WriteAttribute { +public: + WriteWindowCoveringMode() + : WriteAttribute("mode") + { + AddArgument("attr-name", "mode"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlControlMode() {} + ~WriteWindowCoveringMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeControlModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("WindowCovering Mode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -47826,22 +49869,22 @@ class WritePumpConfigurationAndControlControlMode : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringMode : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlControlMode() - : SubscribeAttribute("control-mode") + SubscribeAttributeWindowCoveringMode() + : SubscribeAttribute("mode") { } - ~SubscribeAttributePumpConfigurationAndControlControlMode() {} + ~SubscribeAttributeWindowCoveringMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47852,12 +49895,82 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlModeWithParams:params + [cluster subscribeAttributeModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + NSLog(@"WindowCovering.Mode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SafetyStatus + */ +class ReadWindowCoveringSafetyStatus : public ReadAttribute { +public: + ReadWindowCoveringSafetyStatus() + : ReadAttribute("safety-status") + { + } + + ~ReadWindowCoveringSafetyStatus() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering SafetyStatus read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWindowCoveringSafetyStatus : public SubscribeAttribute { +public: + SubscribeAttributeWindowCoveringSafetyStatus() + : SubscribeAttribute("safety-status") + { + } + + ~SubscribeAttributeWindowCoveringSafetyStatus() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSafetyStatusWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.SafetyStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47868,27 +49981,27 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib /* * Attribute GeneratedCommandList */ -class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { +class ReadWindowCoveringGeneratedCommandList : public ReadAttribute { public: - ReadPumpConfigurationAndControlGeneratedCommandList() + ReadWindowCoveringGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadPumpConfigurationAndControlGeneratedCommandList() {} + ~ReadWindowCoveringGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); + LogNSError("WindowCovering GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -47896,22 +50009,22 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + SubscribeAttributeWindowCoveringGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() {} + ~SubscribeAttributeWindowCoveringGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47927,7 +50040,7 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + NSLog(@"WindowCovering.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -47938,27 +50051,27 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { +class ReadWindowCoveringAcceptedCommandList : public ReadAttribute { public: - ReadPumpConfigurationAndControlAcceptedCommandList() + ReadWindowCoveringAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadPumpConfigurationAndControlAcceptedCommandList() {} + ~ReadWindowCoveringAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); + LogNSError("WindowCovering AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -47966,22 +50079,22 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + SubscribeAttributeWindowCoveringAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() {} + ~SubscribeAttributeWindowCoveringAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47997,7 +50110,77 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + NSLog(@"WindowCovering.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadWindowCoveringEventList : public ReadAttribute { +public: + ReadWindowCoveringEventList() + : ReadAttribute("event-list") + { + } + + ~ReadWindowCoveringEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EventList response %@", [value description]); + if (error != nil) { + LogNSError("WindowCovering EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWindowCoveringEventList : public SubscribeAttribute { +public: + SubscribeAttributeWindowCoveringEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeWindowCoveringEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WindowCovering.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48008,27 +50191,27 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public /* * Attribute AttributeList */ -class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { +class ReadWindowCoveringAttributeList : public ReadAttribute { public: - ReadPumpConfigurationAndControlAttributeList() + ReadWindowCoveringAttributeList() : ReadAttribute("attribute-list") { } - ~ReadPumpConfigurationAndControlAttributeList() {} + ~ReadWindowCoveringAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + NSLog(@"WindowCovering.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl AttributeList read Error", error); + LogNSError("WindowCovering AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -48036,22 +50219,22 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringAttributeList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlAttributeList() + SubscribeAttributeWindowCoveringAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePumpConfigurationAndControlAttributeList() {} + ~SubscribeAttributeWindowCoveringAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48067,7 +50250,7 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + NSLog(@"WindowCovering.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48078,27 +50261,27 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr /* * Attribute FeatureMap */ -class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { +class ReadWindowCoveringFeatureMap : public ReadAttribute { public: - ReadPumpConfigurationAndControlFeatureMap() + ReadWindowCoveringFeatureMap() : ReadAttribute("feature-map") { } - ~ReadPumpConfigurationAndControlFeatureMap() {} + ~ReadWindowCoveringFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); + LogNSError("WindowCovering FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -48106,22 +50289,22 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlFeatureMap() + SubscribeAttributeWindowCoveringFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePumpConfigurationAndControlFeatureMap() {} + ~SubscribeAttributeWindowCoveringFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48137,7 +50320,7 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + NSLog(@"WindowCovering.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48148,27 +50331,27 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe /* * Attribute ClusterRevision */ -class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { +class ReadWindowCoveringClusterRevision : public ReadAttribute { public: - ReadPumpConfigurationAndControlClusterRevision() + ReadWindowCoveringClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadPumpConfigurationAndControlClusterRevision() {} + ~ReadWindowCoveringClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); + LogNSError("WindowCovering ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -48176,22 +50359,22 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeWindowCoveringClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlClusterRevision() + SubscribeAttributeWindowCoveringClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePumpConfigurationAndControlClusterRevision() {} + ~SubscribeAttributeWindowCoveringClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000102) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWindowCovering alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48207,7 +50390,7 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + NSLog(@"WindowCovering.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48216,64 +50399,23 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs }; /*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | +| Cluster BarrierControl | 0x0103 | |------------------------------------------------------------------------------| | Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | +| * BarrierControlGoToPercent | 0x00 | +| * BarrierControlStop | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | +| * BarrierMovingState | 0x0001 | +| * BarrierSafetyStatus | 0x0002 | +| * BarrierCapabilities | 0x0003 | +| * BarrierOpenEvents | 0x0004 | +| * BarrierCloseEvents | 0x0005 | +| * BarrierCommandOpenEvents | 0x0006 | +| * BarrierCommandCloseEvents | 0x0007 | +| * BarrierOpenPeriod | 0x0008 | +| * BarrierClosePeriod | 0x0009 | +| * BarrierPosition | 0x000A | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -48285,214 +50427,87 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs \*----------------------------------------------------------------------------*/ /* - * Command SetpointRaiseLower + * Command BarrierControlGoToPercent */ -class ThermostatSetpointRaiseLower : public ClusterCommand { +class BarrierControlBarrierControlGoToPercent : public ClusterCommand { public: - ThermostatSetpointRaiseLower() - : ClusterCommand("setpoint-raise-lower") + BarrierControlBarrierControlGoToPercent() + : ClusterCommand("barrier-control-go-to-percent") { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + AddArgument("PercentOpen", 0, UINT8_MAX, &mRequest.percentOpen); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; - params.amount = [NSNumber numberWithChar:mRequest.amount]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setpointRaiseLowerWithParams:params - completion:^(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::Thermostat::Commands::SetpointRaiseLower::Type mRequest; -}; - -/* - * Command SetWeeklySchedule - */ -class ThermostatSetWeeklySchedule : public ClusterCommand { -public: - ThermostatSetWeeklySchedule() - : ClusterCommand("set-weekly-schedule") - , mComplex_Transitions(&mRequest.transitions) - { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; - params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; - params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.transitions) { - MTRThermostatClusterThermostatScheduleTransition * newElement_0; - newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; - newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - if (entry_0.heatSetpoint.IsNull()) { - newElement_0.heatSetpoint = nil; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } - [array_0 addObject:newElement_0]; - } - params.transitions = array_0; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeeklyScheduleWithParams:params - completion:^(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::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex_Transitions; -}; - -/* - * Command GetWeeklySchedule - */ -class ThermostatGetWeeklySchedule : public ClusterCommand { -public: - ThermostatGetWeeklySchedule() - : ClusterCommand("get-weekly-schedule") - { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; - params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; + params.percentOpen = [NSNumber numberWithUnsignedChar:mRequest.percentOpen]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster getWeeklyScheduleWithParams:params - completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster barrierControlGoToPercentWithParams:params + completion:^(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::Thermostat::Commands::GetWeeklySchedule::Type mRequest; + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type mRequest; }; /* - * Command ClearWeeklySchedule + * Command BarrierControlStop */ -class ThermostatClearWeeklySchedule : public ClusterCommand { +class BarrierControlBarrierControlStop : public ClusterCommand { public: - ThermostatClearWeeklySchedule() - : ClusterCommand("clear-weekly-schedule") + BarrierControlBarrierControlStop() + : ClusterCommand("barrier-control-stop") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster clearWeeklyScheduleWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster barrierControlStopWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -48501,29 +50516,29 @@ class ThermostatClearWeeklySchedule : public ClusterCommand { }; /* - * Attribute LocalTemperature + * Attribute BarrierMovingState */ -class ReadThermostatLocalTemperature : public ReadAttribute { +class ReadBarrierControlBarrierMovingState : public ReadAttribute { public: - ReadThermostatLocalTemperature() - : ReadAttribute("local-temperature") + ReadBarrierControlBarrierMovingState() + : ReadAttribute("barrier-moving-state") { } - ~ReadThermostatLocalTemperature() {} + ~ReadBarrierControlBarrierMovingState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierMovingStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); if (error != nil) { - LogNSError("Thermostat LocalTemperature read Error", error); + LogNSError("BarrierControl BarrierMovingState read Error", error); } SetCommandExitStatus(error); }]; @@ -48531,22 +50546,22 @@ class ReadThermostatLocalTemperature : public ReadAttribute { } }; -class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierMovingState : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperature() - : SubscribeAttribute("local-temperature") + SubscribeAttributeBarrierControlBarrierMovingState() + : SubscribeAttribute("barrier-moving-state") { } - ~SubscribeAttributeThermostatLocalTemperature() {} + ~SubscribeAttributeBarrierControlBarrierMovingState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48557,12 +50572,12 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureWithParams:params + [cluster subscribeAttributeBarrierMovingStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + NSLog(@"BarrierControl.BarrierMovingState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48571,29 +50586,29 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { }; /* - * Attribute OutdoorTemperature + * Attribute BarrierSafetyStatus */ -class ReadThermostatOutdoorTemperature : public ReadAttribute { +class ReadBarrierControlBarrierSafetyStatus : public ReadAttribute { public: - ReadThermostatOutdoorTemperature() - : ReadAttribute("outdoor-temperature") + ReadBarrierControlBarrierSafetyStatus() + : ReadAttribute("barrier-safety-status") { } - ~ReadThermostatOutdoorTemperature() {} + ~ReadBarrierControlBarrierSafetyStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierSafetyStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); if (error != nil) { - LogNSError("Thermostat OutdoorTemperature read Error", error); + LogNSError("BarrierControl BarrierSafetyStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -48601,22 +50616,22 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { } }; -class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierSafetyStatus : public SubscribeAttribute { public: - SubscribeAttributeThermostatOutdoorTemperature() - : SubscribeAttribute("outdoor-temperature") + SubscribeAttributeBarrierControlBarrierSafetyStatus() + : SubscribeAttribute("barrier-safety-status") { } - ~SubscribeAttributeThermostatOutdoorTemperature() {} + ~SubscribeAttributeBarrierControlBarrierSafetyStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48627,12 +50642,12 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutdoorTemperatureWithParams:params + [cluster subscribeAttributeBarrierSafetyStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + NSLog(@"BarrierControl.BarrierSafetyStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48641,29 +50656,29 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute }; /* - * Attribute Occupancy + * Attribute BarrierCapabilities */ -class ReadThermostatOccupancy : public ReadAttribute { +class ReadBarrierControlBarrierCapabilities : public ReadAttribute { public: - ReadThermostatOccupancy() - : ReadAttribute("occupancy") + ReadBarrierControlBarrierCapabilities() + : ReadAttribute("barrier-capabilities") { } - ~ReadThermostatOccupancy() {} + ~ReadBarrierControlBarrierCapabilities() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); if (error != nil) { - LogNSError("Thermostat Occupancy read Error", error); + LogNSError("BarrierControl BarrierCapabilities read Error", error); } SetCommandExitStatus(error); }]; @@ -48671,22 +50686,22 @@ class ReadThermostatOccupancy : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierCapabilities : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupancy() - : SubscribeAttribute("occupancy") + SubscribeAttributeBarrierControlBarrierCapabilities() + : SubscribeAttribute("barrier-capabilities") { } - ~SubscribeAttributeThermostatOccupancy() {} + ~SubscribeAttributeBarrierControlBarrierCapabilities() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48697,12 +50712,12 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancyWithParams:params + [cluster subscribeAttributeBarrierCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); + NSLog(@"BarrierControl.BarrierCapabilities response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48711,29 +50726,29 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { }; /* - * Attribute AbsMinHeatSetpointLimit + * Attribute BarrierOpenEvents */ -class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { +class ReadBarrierControlBarrierOpenEvents : public ReadAttribute { public: - ReadThermostatAbsMinHeatSetpointLimit() - : ReadAttribute("abs-min-heat-setpoint-limit") + ReadBarrierControlBarrierOpenEvents() + : ReadAttribute("barrier-open-events") { } - ~ReadThermostatAbsMinHeatSetpointLimit() {} + ~ReadBarrierControlBarrierOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); if (error != nil) { - LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); + LogNSError("BarrierControl BarrierOpenEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -48741,22 +50756,62 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { +class WriteBarrierControlBarrierOpenEvents : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMinHeatSetpointLimit() - : SubscribeAttribute("abs-min-heat-setpoint-limit") + WriteBarrierControlBarrierOpenEvents() + : WriteAttribute("barrier-open-events") { + AddArgument("attr-name", "barrier-open-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() {} + ~WriteBarrierControlBarrierOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierOpenEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierOpenEvents : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierOpenEvents() + : SubscribeAttribute("barrier-open-events") + { + } + + ~SubscribeAttributeBarrierControlBarrierOpenEvents() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48767,12 +50822,12 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeBarrierOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + NSLog(@"BarrierControl.BarrierOpenEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48781,29 +50836,29 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMaxHeatSetpointLimit + * Attribute BarrierCloseEvents */ -class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { +class ReadBarrierControlBarrierCloseEvents : public ReadAttribute { public: - ReadThermostatAbsMaxHeatSetpointLimit() - : ReadAttribute("abs-max-heat-setpoint-limit") + ReadBarrierControlBarrierCloseEvents() + : ReadAttribute("barrier-close-events") { } - ~ReadThermostatAbsMaxHeatSetpointLimit() {} + ~ReadBarrierControlBarrierCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); if (error != nil) { - LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); + LogNSError("BarrierControl BarrierCloseEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -48811,22 +50866,62 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { +class WriteBarrierControlBarrierCloseEvents : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() - : SubscribeAttribute("abs-max-heat-setpoint-limit") + WriteBarrierControlBarrierCloseEvents() + : WriteAttribute("barrier-close-events") { + AddArgument("attr-name", "barrier-close-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() {} + ~WriteBarrierControlBarrierCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeBarrierCloseEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCloseEvents write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeBarrierControlBarrierCloseEvents : public SubscribeAttribute { +public: + SubscribeAttributeBarrierControlBarrierCloseEvents() + : SubscribeAttribute("barrier-close-events") + { + } + + ~SubscribeAttributeBarrierControlBarrierCloseEvents() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48837,12 +50932,12 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeBarrierCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + NSLog(@"BarrierControl.BarrierCloseEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48851,29 +50946,29 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMinCoolSetpointLimit + * Attribute BarrierCommandOpenEvents */ -class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { +class ReadBarrierControlBarrierCommandOpenEvents : public ReadAttribute { public: - ReadThermostatAbsMinCoolSetpointLimit() - : ReadAttribute("abs-min-cool-setpoint-limit") + ReadBarrierControlBarrierCommandOpenEvents() + : ReadAttribute("barrier-command-open-events") { } - ~ReadThermostatAbsMinCoolSetpointLimit() {} + ~ReadBarrierControlBarrierCommandOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCommandOpenEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl BarrierCommandOpenEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -48881,92 +50976,63 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { +class WriteBarrierControlBarrierCommandOpenEvents : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMinCoolSetpointLimit() - : SubscribeAttribute("abs-min-cool-setpoint-limit") + WriteBarrierControlBarrierCommandOpenEvents() + : WriteAttribute("barrier-command-open-events") { + AddArgument("attr-name", "barrier-command-open-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() {} + ~WriteBarrierControlBarrierCommandOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + [cluster + writeAttributeBarrierCommandOpenEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandOpenEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute AbsMaxCoolSetpointLimit - */ -class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { -public: - ReadThermostatAbsMaxCoolSetpointLimit() - : ReadAttribute("abs-max-cool-setpoint-limit") - { - } - - ~ReadThermostatAbsMaxCoolSetpointLimit() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000006) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint16_t mValue; }; -class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierCommandOpenEvents : public SubscribeAttribute { public: - SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() - : SubscribeAttribute("abs-max-cool-setpoint-limit") + SubscribeAttributeBarrierControlBarrierCommandOpenEvents() + : SubscribeAttribute("barrier-command-open-events") { } - ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() {} + ~SubscribeAttributeBarrierControlBarrierCommandOpenEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -48977,12 +51043,12 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeBarrierCommandOpenEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + NSLog(@"BarrierControl.BarrierCommandOpenEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -48991,29 +51057,29 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr }; /* - * Attribute PICoolingDemand + * Attribute BarrierCommandCloseEvents */ -class ReadThermostatPICoolingDemand : public ReadAttribute { +class ReadBarrierControlBarrierCommandCloseEvents : public ReadAttribute { public: - ReadThermostatPICoolingDemand() - : ReadAttribute("picooling-demand") + ReadBarrierControlBarrierCommandCloseEvents() + : ReadAttribute("barrier-command-close-events") { } - ~ReadThermostatPICoolingDemand() {} + ~ReadBarrierControlBarrierCommandCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierCommandCloseEventsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); if (error != nil) { - LogNSError("Thermostat PICoolingDemand read Error", error); + LogNSError("BarrierControl BarrierCommandCloseEvents read Error", error); } SetCommandExitStatus(error); }]; @@ -49021,92 +51087,63 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { } }; -class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { +class WriteBarrierControlBarrierCommandCloseEvents : public WriteAttribute { public: - SubscribeAttributeThermostatPICoolingDemand() - : SubscribeAttribute("picooling-demand") + WriteBarrierControlBarrierCommandCloseEvents() + : WriteAttribute("barrier-command-close-events") { + AddArgument("attr-name", "barrier-command-close-events"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatPICoolingDemand() {} + ~WriteBarrierControlBarrierCommandCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributePICoolingDemandWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + [cluster + writeAttributeBarrierCommandCloseEventsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierCommandCloseEvents write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } -}; - -/* - * Attribute PIHeatingDemand - */ -class ReadThermostatPIHeatingDemand : public ReadAttribute { -public: - ReadThermostatPIHeatingDemand() - : ReadAttribute("piheating-demand") - { - } - - ~ReadThermostatPIHeatingDemand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat PIHeatingDemand read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + uint16_t mValue; }; -class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierCommandCloseEvents : public SubscribeAttribute { public: - SubscribeAttributeThermostatPIHeatingDemand() - : SubscribeAttribute("piheating-demand") + SubscribeAttributeBarrierControlBarrierCommandCloseEvents() + : SubscribeAttribute("barrier-command-close-events") { } - ~SubscribeAttributeThermostatPIHeatingDemand() {} + ~SubscribeAttributeBarrierControlBarrierCommandCloseEvents() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49117,12 +51154,12 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIHeatingDemandWithParams:params + [cluster subscribeAttributeBarrierCommandCloseEventsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + NSLog(@"BarrierControl.BarrierCommandCloseEvents response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49131,29 +51168,29 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { }; /* - * Attribute HVACSystemTypeConfiguration + * Attribute BarrierOpenPeriod */ -class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { +class ReadBarrierControlBarrierOpenPeriod : public ReadAttribute { public: - ReadThermostatHVACSystemTypeConfiguration() - : ReadAttribute("hvacsystem-type-configuration") + ReadBarrierControlBarrierOpenPeriod() + : ReadAttribute("barrier-open-period") { } - ~ReadThermostatHVACSystemTypeConfiguration() {} + ~ReadBarrierControlBarrierOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierOpenPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + LogNSError("BarrierControl BarrierOpenPeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -49161,63 +51198,62 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { } }; -class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { +class WriteBarrierControlBarrierOpenPeriod : public WriteAttribute { public: - WriteThermostatHVACSystemTypeConfiguration() - : WriteAttribute("hvacsystem-type-configuration") + WriteBarrierControlBarrierOpenPeriod() + : WriteAttribute("barrier-open-period") { - AddArgument("attr-name", "hvacsystem-type-configuration"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "barrier-open-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatHVACSystemTypeConfiguration() {} + ~WriteBarrierControlBarrierOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributeHVACSystemTypeConfigurationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeBarrierOpenPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierOpenPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint8_t mValue; + uint16_t mValue; }; -class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierOpenPeriod : public SubscribeAttribute { public: - SubscribeAttributeThermostatHVACSystemTypeConfiguration() - : SubscribeAttribute("hvacsystem-type-configuration") + SubscribeAttributeBarrierControlBarrierOpenPeriod() + : SubscribeAttribute("barrier-open-period") { } - ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() {} + ~SubscribeAttributeBarrierControlBarrierOpenPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49228,12 +51264,12 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params + [cluster subscribeAttributeBarrierOpenPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + NSLog(@"BarrierControl.BarrierOpenPeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49242,29 +51278,29 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe }; /* - * Attribute LocalTemperatureCalibration + * Attribute BarrierClosePeriod */ -class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { +class ReadBarrierControlBarrierClosePeriod : public ReadAttribute { public: - ReadThermostatLocalTemperatureCalibration() - : ReadAttribute("local-temperature-calibration") + ReadBarrierControlBarrierClosePeriod() + : ReadAttribute("barrier-close-period") { } - ~ReadThermostatLocalTemperatureCalibration() {} + ~ReadBarrierControlBarrierClosePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierClosePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + LogNSError("BarrierControl BarrierClosePeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -49272,63 +51308,62 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { } }; -class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { +class WriteBarrierControlBarrierClosePeriod : public WriteAttribute { public: - WriteThermostatLocalTemperatureCalibration() - : WriteAttribute("local-temperature-calibration") + WriteBarrierControlBarrierClosePeriod() + : WriteAttribute("barrier-close-period") { - AddArgument("attr-name", "local-temperature-calibration"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + AddArgument("attr-name", "barrier-close-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatLocalTemperatureCalibration() {} + ~WriteBarrierControlBarrierClosePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) WriteAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster - writeAttributeLocalTemperatureCalibrationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeBarrierClosePeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BarrierControl BarrierClosePeriod write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - int8_t mValue; + uint16_t mValue; }; -class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierClosePeriod : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperatureCalibration() - : SubscribeAttribute("local-temperature-calibration") + SubscribeAttributeBarrierControlBarrierClosePeriod() + : SubscribeAttribute("barrier-close-period") { } - ~SubscribeAttributeThermostatLocalTemperatureCalibration() {} + ~SubscribeAttributeBarrierControlBarrierClosePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49339,12 +51374,12 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params + [cluster subscribeAttributeBarrierClosePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + NSLog(@"BarrierControl.BarrierClosePeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49353,29 +51388,29 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe }; /* - * Attribute OccupiedCoolingSetpoint + * Attribute BarrierPosition */ -class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { +class ReadBarrierControlBarrierPosition : public ReadAttribute { public: - ReadThermostatOccupiedCoolingSetpoint() - : ReadAttribute("occupied-cooling-setpoint") + ReadBarrierControlBarrierPosition() + : ReadAttribute("barrier-position") { } - ~ReadThermostatOccupiedCoolingSetpoint() {} + ~ReadBarrierControlBarrierPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBarrierPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + LogNSError("BarrierControl BarrierPosition read Error", error); } SetCommandExitStatus(error); }]; @@ -49383,62 +51418,22 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { -public: - WriteThermostatOccupiedCoolingSetpoint() - : WriteAttribute("occupied-cooling-setpoint") - { - AddArgument("attr-name", "occupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeOccupiedCoolingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeBarrierControlBarrierPosition : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedCoolingSetpoint() - : SubscribeAttribute("occupied-cooling-setpoint") + SubscribeAttributeBarrierControlBarrierPosition() + : SubscribeAttribute("barrier-position") { } - ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() {} + ~SubscribeAttributeBarrierControlBarrierPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49449,12 +51444,12 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeBarrierPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + NSLog(@"BarrierControl.BarrierPosition response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49463,92 +51458,52 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr }; /* - * Attribute OccupiedHeatingSetpoint + * Attribute GeneratedCommandList */ -class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { +class ReadBarrierControlGeneratedCommandList : public ReadAttribute { public: - ReadThermostatOccupiedHeatingSetpoint() - : ReadAttribute("occupied-heating-setpoint") + ReadBarrierControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThermostatOccupiedHeatingSetpoint() {} + ~ReadBarrierControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); - } + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("BarrierControl GeneratedCommandList read Error", error); + } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } }; -class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { -public: - WriteThermostatOccupiedHeatingSetpoint() - : WriteAttribute("occupied-heating-setpoint") - { - AddArgument("attr-name", "occupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatOccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000012) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeOccupiedHeatingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeBarrierControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedHeatingSetpoint() - : SubscribeAttribute("occupied-heating-setpoint") + SubscribeAttributeBarrierControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() {} + ~SubscribeAttributeBarrierControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49559,12 +51514,12 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49573,29 +51528,29 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr }; /* - * Attribute UnoccupiedCoolingSetpoint + * Attribute AcceptedCommandList */ -class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { +class ReadBarrierControlAcceptedCommandList : public ReadAttribute { public: - ReadThermostatUnoccupiedCoolingSetpoint() - : ReadAttribute("unoccupied-cooling-setpoint") + ReadBarrierControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThermostatUnoccupiedCoolingSetpoint() {} + ~ReadBarrierControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + LogNSError("BarrierControl AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -49603,63 +51558,22 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { -public: - WriteThermostatUnoccupiedCoolingSetpoint() - : WriteAttribute("unoccupied-cooling-setpoint") - { - AddArgument("attr-name", "unoccupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedCoolingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000013) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster - writeAttributeUnoccupiedCoolingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeBarrierControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() - : SubscribeAttribute("unoccupied-cooling-setpoint") + SubscribeAttributeBarrierControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() {} + ~SubscribeAttributeBarrierControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49670,12 +51584,12 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49684,29 +51598,29 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt }; /* - * Attribute UnoccupiedHeatingSetpoint + * Attribute EventList */ -class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { +class ReadBarrierControlEventList : public ReadAttribute { public: - ReadThermostatUnoccupiedHeatingSetpoint() - : ReadAttribute("unoccupied-heating-setpoint") + ReadBarrierControlEventList() + : ReadAttribute("event-list") { } - ~ReadThermostatUnoccupiedHeatingSetpoint() {} + ~ReadBarrierControlEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.EventList response %@", [value description]); if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + LogNSError("BarrierControl EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -49714,63 +51628,22 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { -public: - WriteThermostatUnoccupiedHeatingSetpoint() - : WriteAttribute("unoccupied-heating-setpoint") - { - AddArgument("attr-name", "unoccupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedHeatingSetpoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000014) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster - writeAttributeUnoccupiedHeatingSetpointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeBarrierControlEventList : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() - : SubscribeAttribute("unoccupied-heating-setpoint") + SubscribeAttributeBarrierControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() {} + ~SubscribeAttributeBarrierControlEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49781,12 +51654,12 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49795,29 +51668,29 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt }; /* - * Attribute MinHeatSetpointLimit + * Attribute AttributeList */ -class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { +class ReadBarrierControlAttributeList : public ReadAttribute { public: - ReadThermostatMinHeatSetpointLimit() - : ReadAttribute("min-heat-setpoint-limit") + ReadBarrierControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThermostatMinHeatSetpointLimit() {} + ~ReadBarrierControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit read Error", error); + LogNSError("BarrierControl AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -49825,62 +51698,22 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { -public: - WriteThermostatMinHeatSetpointLimit() - : WriteAttribute("min-heat-setpoint-limit") - { - AddArgument("attr-name", "min-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeMinHeatSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeBarrierControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinHeatSetpointLimit() - : SubscribeAttribute("min-heat-setpoint-limit") + SubscribeAttributeBarrierControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThermostatMinHeatSetpointLimit() {} + ~SubscribeAttributeBarrierControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -49891,12 +51724,12 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -49905,29 +51738,29 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MaxHeatSetpointLimit + * Attribute FeatureMap */ -class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { +class ReadBarrierControlFeatureMap : public ReadAttribute { public: - ReadThermostatMaxHeatSetpointLimit() - : ReadAttribute("max-heat-setpoint-limit") + ReadBarrierControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThermostatMaxHeatSetpointLimit() {} + ~ReadBarrierControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); + LogNSError("BarrierControl FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -49935,62 +51768,22 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { -public: - WriteThermostatMaxHeatSetpointLimit() - : WriteAttribute("max-heat-setpoint-limit") - { - AddArgument("attr-name", "max-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMaxHeatSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000016) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeMaxHeatSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeBarrierControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxHeatSetpointLimit() - : SubscribeAttribute("max-heat-setpoint-limit") + SubscribeAttributeBarrierControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThermostatMaxHeatSetpointLimit() {} + ~SubscribeAttributeBarrierControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50001,12 +51794,12 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + NSLog(@"BarrierControl.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50015,29 +51808,29 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinCoolSetpointLimit + * Attribute ClusterRevision */ -class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { +class ReadBarrierControlClusterRevision : public ReadAttribute { public: - ReadThermostatMinCoolSetpointLimit() - : ReadAttribute("min-cool-setpoint-limit") + ReadBarrierControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThermostatMinCoolSetpointLimit() {} + ~ReadBarrierControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit read Error", error); + LogNSError("BarrierControl ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -50045,62 +51838,22 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { -public: - WriteThermostatMinCoolSetpointLimit() - : WriteAttribute("min-cool-setpoint-limit") - { - AddArgument("attr-name", "min-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000017) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; - - [cluster writeAttributeMinCoolSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int16_t mValue; -}; - -class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeBarrierControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinCoolSetpointLimit() - : SubscribeAttribute("min-cool-setpoint-limit") + SubscribeAttributeBarrierControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThermostatMinCoolSetpointLimit() {} + ~SubscribeAttributeBarrierControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000103) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBarrierControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50111,12 +51864,12 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + NSLog(@"BarrierControl.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50124,93 +51877,109 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu } }; -/* - * Attribute MaxCoolSetpointLimit - */ -class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { -public: - ReadThermostatMaxCoolSetpointLimit() - : ReadAttribute("max-cool-setpoint-limit") - { - } - - ~ReadThermostatMaxCoolSetpointLimit() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000018) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; +/*----------------------------------------------------------------------------*\ +| Cluster PumpConfigurationAndControl | 0x0200 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MaxPressure | 0x0000 | +| * MaxSpeed | 0x0001 | +| * MaxFlow | 0x0002 | +| * MinConstPressure | 0x0003 | +| * MaxConstPressure | 0x0004 | +| * MinCompPressure | 0x0005 | +| * MaxCompPressure | 0x0006 | +| * MinConstSpeed | 0x0007 | +| * MaxConstSpeed | 0x0008 | +| * MinConstFlow | 0x0009 | +| * MaxConstFlow | 0x000A | +| * MinConstTemp | 0x000B | +| * MaxConstTemp | 0x000C | +| * PumpStatus | 0x0010 | +| * EffectiveOperationMode | 0x0011 | +| * EffectiveControlMode | 0x0012 | +| * Capacity | 0x0013 | +| * Speed | 0x0014 | +| * LifetimeRunningHours | 0x0015 | +| * Power | 0x0016 | +| * LifetimeEnergyConsumed | 0x0017 | +| * OperationMode | 0x0020 | +| * ControlMode | 0x0021 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SupplyVoltageLow | 0x0000 | +| * SupplyVoltageHigh | 0x0001 | +| * PowerMissingPhase | 0x0002 | +| * SystemPressureLow | 0x0003 | +| * SystemPressureHigh | 0x0004 | +| * DryRunning | 0x0005 | +| * MotorTemperatureHigh | 0x0006 | +| * PumpMotorFatalFailure | 0x0007 | +| * ElectronicTemperatureHigh | 0x0008 | +| * PumpBlocked | 0x0009 | +| * SensorFailure | 0x000A | +| * ElectronicNonFatalFailure | 0x000B | +| * ElectronicFatalFailure | 0x000C | +| * GeneralFault | 0x000D | +| * Leakage | 0x000E | +| * AirDetection | 0x000F | +| * TurbineOperation | 0x0010 | +\*----------------------------------------------------------------------------*/ -class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { +/* + * Attribute MaxPressure + */ +class ReadPumpConfigurationAndControlMaxPressure : public ReadAttribute { public: - WriteThermostatMaxCoolSetpointLimit() - : WriteAttribute("max-cool-setpoint-limit") + ReadPumpConfigurationAndControlMaxPressure() + : ReadAttribute("max-pressure") { - AddArgument("attr-name", "max-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatMaxCoolSetpointLimit() {} + ~ReadPumpConfigurationAndControlMaxPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000018) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000000) on endpoint %u", endpointId); - [cluster writeAttributeMaxCoolSetpointLimitWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); + if (error != nil) { + LogNSError("PumpConfigurationAndControl MaxPressure read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxPressure : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxCoolSetpointLimit() - : SubscribeAttribute("max-cool-setpoint-limit") + SubscribeAttributePumpConfigurationAndControlMaxPressure() + : SubscribeAttribute("max-pressure") { } - ~SubscribeAttributeThermostatMaxCoolSetpointLimit() {} + ~SubscribeAttributePumpConfigurationAndControlMaxPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000018) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50221,12 +51990,12 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeMaxPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50235,29 +52004,29 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinSetpointDeadBand + * Attribute MaxSpeed */ -class ReadThermostatMinSetpointDeadBand : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxSpeed : public ReadAttribute { public: - ReadThermostatMinSetpointDeadBand() - : ReadAttribute("min-setpoint-dead-band") + ReadPumpConfigurationAndControlMaxSpeed() + : ReadAttribute("max-speed") { } - ~ReadThermostatMinSetpointDeadBand() {} + ~ReadPumpConfigurationAndControlMaxSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000019) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand read Error", error); + LogNSError("PumpConfigurationAndControl MaxSpeed read Error", error); } SetCommandExitStatus(error); }]; @@ -50265,62 +52034,22 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { } }; -class WriteThermostatMinSetpointDeadBand : public WriteAttribute { -public: - WriteThermostatMinSetpointDeadBand() - : WriteAttribute("min-setpoint-dead-band") - { - AddArgument("attr-name", "min-setpoint-dead-band"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatMinSetpointDeadBand() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000019) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - - [cluster writeAttributeMinSetpointDeadBandWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - int8_t mValue; -}; - -class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxSpeed : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinSetpointDeadBand() - : SubscribeAttribute("min-setpoint-dead-band") + SubscribeAttributePumpConfigurationAndControlMaxSpeed() + : SubscribeAttribute("max-speed") { } - ~SubscribeAttributeThermostatMinSetpointDeadBand() {} + ~SubscribeAttributePumpConfigurationAndControlMaxSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000019) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50331,12 +52060,12 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinSetpointDeadBandWithParams:params + [cluster subscribeAttributeMaxSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxSpeed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50345,29 +52074,29 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut }; /* - * Attribute RemoteSensing + * Attribute MaxFlow */ -class ReadThermostatRemoteSensing : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxFlow : public ReadAttribute { public: - ReadThermostatRemoteSensing() - : ReadAttribute("remote-sensing") + ReadPumpConfigurationAndControlMaxFlow() + : ReadAttribute("max-flow") { } - ~ReadThermostatRemoteSensing() {} + ~ReadPumpConfigurationAndControlMaxFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); if (error != nil) { - LogNSError("Thermostat RemoteSensing read Error", error); + LogNSError("PumpConfigurationAndControl MaxFlow read Error", error); } SetCommandExitStatus(error); }]; @@ -50375,62 +52104,22 @@ class ReadThermostatRemoteSensing : public ReadAttribute { } }; -class WriteThermostatRemoteSensing : public WriteAttribute { -public: - WriteThermostatRemoteSensing() - : WriteAttribute("remote-sensing") - { - AddArgument("attr-name", "remote-sensing"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatRemoteSensing() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeRemoteSensingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat RemoteSensing write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxFlow : public SubscribeAttribute { public: - SubscribeAttributeThermostatRemoteSensing() - : SubscribeAttribute("remote-sensing") + SubscribeAttributePumpConfigurationAndControlMaxFlow() + : SubscribeAttribute("max-flow") { } - ~SubscribeAttributeThermostatRemoteSensing() {} + ~SubscribeAttributePumpConfigurationAndControlMaxFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50441,12 +52130,12 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemoteSensingWithParams:params + [cluster subscribeAttributeMaxFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxFlow response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50455,29 +52144,29 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { }; /* - * Attribute ControlSequenceOfOperation + * Attribute MinConstPressure */ -class ReadThermostatControlSequenceOfOperation : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstPressure : public ReadAttribute { public: - ReadThermostatControlSequenceOfOperation() - : ReadAttribute("control-sequence-of-operation") + ReadPumpConfigurationAndControlMinConstPressure() + : ReadAttribute("min-const-pressure") { } - ~ReadThermostatControlSequenceOfOperation() {} + ~ReadPumpConfigurationAndControlMinConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation read Error", error); + LogNSError("PumpConfigurationAndControl MinConstPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -50485,63 +52174,22 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { } }; -class WriteThermostatControlSequenceOfOperation : public WriteAttribute { -public: - WriteThermostatControlSequenceOfOperation() - : WriteAttribute("control-sequence-of-operation") - { - AddArgument("attr-name", "control-sequence-of-operation"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatControlSequenceOfOperation() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001B) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeControlSequenceOfOperationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstPressure : public SubscribeAttribute { public: - SubscribeAttributeThermostatControlSequenceOfOperation() - : SubscribeAttribute("control-sequence-of-operation") + SubscribeAttributePumpConfigurationAndControlMinConstPressure() + : SubscribeAttribute("min-const-pressure") { } - ~SubscribeAttributeThermostatControlSequenceOfOperation() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50552,12 +52200,12 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlSequenceOfOperationWithParams:params + [cluster subscribeAttributeMinConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50566,29 +52214,29 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA }; /* - * Attribute SystemMode + * Attribute MaxConstPressure */ -class ReadThermostatSystemMode : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { public: - ReadThermostatSystemMode() - : ReadAttribute("system-mode") + ReadPumpConfigurationAndControlMaxConstPressure() + : ReadAttribute("max-const-pressure") { } - ~ReadThermostatSystemMode() {} + ~ReadPumpConfigurationAndControlMaxConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); if (error != nil) { - LogNSError("Thermostat SystemMode read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -50596,62 +52244,22 @@ class ReadThermostatSystemMode : public ReadAttribute { } }; -class WriteThermostatSystemMode : public WriteAttribute { -public: - WriteThermostatSystemMode() - : WriteAttribute("system-mode") - { - AddArgument("attr-name", "system-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatSystemMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001C) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSystemModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat SystemMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { public: - SubscribeAttributeThermostatSystemMode() - : SubscribeAttribute("system-mode") + SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + : SubscribeAttribute("max-const-pressure") { } - ~SubscribeAttributeThermostatSystemMode() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50662,12 +52270,12 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSystemModeWithParams:params + [cluster subscribeAttributeMaxConstPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50676,29 +52284,29 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { }; /* - * Attribute ThermostatRunningMode + * Attribute MinCompPressure */ -class ReadThermostatThermostatRunningMode : public ReadAttribute { +class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { public: - ReadThermostatThermostatRunningMode() - : ReadAttribute("thermostat-running-mode") + ReadPumpConfigurationAndControlMinCompPressure() + : ReadAttribute("min-comp-pressure") { } - ~ReadThermostatThermostatRunningMode() {} + ~ReadPumpConfigurationAndControlMinCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ThermostatRunningMode read Error", error); + LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -50706,22 +52314,22 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { } }; -class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatRunningMode() - : SubscribeAttribute("thermostat-running-mode") + SubscribeAttributePumpConfigurationAndControlMinCompPressure() + : SubscribeAttribute("min-comp-pressure") { } - ~SubscribeAttributeThermostatThermostatRunningMode() {} + ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50732,12 +52340,12 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatRunningModeWithParams:params + [cluster subscribeAttributeMinCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50746,29 +52354,29 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib }; /* - * Attribute StartOfWeek + * Attribute MaxCompPressure */ -class ReadThermostatStartOfWeek : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { public: - ReadThermostatStartOfWeek() - : ReadAttribute("start-of-week") + ReadPumpConfigurationAndControlMaxCompPressure() + : ReadAttribute("max-comp-pressure") { } - ~ReadThermostatStartOfWeek() {} + ~ReadPumpConfigurationAndControlMaxCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); if (error != nil) { - LogNSError("Thermostat StartOfWeek read Error", error); + LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); } SetCommandExitStatus(error); }]; @@ -50776,22 +52384,22 @@ class ReadThermostatStartOfWeek : public ReadAttribute { } }; -class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { public: - SubscribeAttributeThermostatStartOfWeek() - : SubscribeAttribute("start-of-week") + SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + : SubscribeAttribute("max-comp-pressure") { } - ~SubscribeAttributeThermostatStartOfWeek() {} + ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50802,12 +52410,12 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartOfWeekWithParams:params + [cluster subscribeAttributeMaxCompPressureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50816,29 +52424,29 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { }; /* - * Attribute NumberOfWeeklyTransitions + * Attribute MinConstSpeed */ -class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { public: - ReadThermostatNumberOfWeeklyTransitions() - : ReadAttribute("number-of-weekly-transitions") + ReadPumpConfigurationAndControlMinConstSpeed() + : ReadAttribute("min-const-speed") { } - ~ReadThermostatNumberOfWeeklyTransitions() {} + ~ReadPumpConfigurationAndControlMinConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); if (error != nil) { - LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); } SetCommandExitStatus(error); }]; @@ -50846,22 +52454,22 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfWeeklyTransitions() - : SubscribeAttribute("number-of-weekly-transitions") + SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + : SubscribeAttribute("min-const-speed") { } - ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50872,12 +52480,12 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params + [cluster subscribeAttributeMinConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50886,29 +52494,29 @@ class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAt }; /* - * Attribute NumberOfDailyTransitions + * Attribute MaxConstSpeed */ -class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { public: - ReadThermostatNumberOfDailyTransitions() - : ReadAttribute("number-of-daily-transitions") + ReadPumpConfigurationAndControlMaxConstSpeed() + : ReadAttribute("max-const-speed") { } - ~ReadThermostatNumberOfDailyTransitions() {} + ~ReadPumpConfigurationAndControlMaxConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); if (error != nil) { - LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); } SetCommandExitStatus(error); }]; @@ -50916,22 +52524,22 @@ class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfDailyTransitions() - : SubscribeAttribute("number-of-daily-transitions") + SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + : SubscribeAttribute("max-const-speed") { } - ~SubscribeAttributeThermostatNumberOfDailyTransitions() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50942,12 +52550,12 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params + [cluster subscribeAttributeMaxConstSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -50956,29 +52564,29 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt }; /* - * Attribute TemperatureSetpointHold + * Attribute MinConstFlow */ -class ReadThermostatTemperatureSetpointHold : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHold() - : ReadAttribute("temperature-setpoint-hold") + ReadPumpConfigurationAndControlMinConstFlow() + : ReadAttribute("min-const-flow") { } - ~ReadThermostatTemperatureSetpointHold() {} + ~ReadPumpConfigurationAndControlMinConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000023) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold read Error", error); + LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); } SetCommandExitStatus(error); }]; @@ -50986,62 +52594,22 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { } }; -class WriteThermostatTemperatureSetpointHold : public WriteAttribute { -public: - WriteThermostatTemperatureSetpointHold() - : WriteAttribute("temperature-setpoint-hold") - { - AddArgument("attr-name", "temperature-setpoint-hold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatTemperatureSetpointHold() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000023) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeTemperatureSetpointHoldWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHold() - : SubscribeAttribute("temperature-setpoint-hold") + SubscribeAttributePumpConfigurationAndControlMinConstFlow() + : SubscribeAttribute("min-const-flow") { } - ~SubscribeAttributeThermostatTemperatureSetpointHold() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000023) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51052,12 +52620,12 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params + [cluster subscribeAttributeMinConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51066,95 +52634,52 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr }; /* - * Attribute TemperatureSetpointHoldDuration + * Attribute MaxConstFlow */ -class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHoldDuration() - : ReadAttribute("temperature-setpoint-hold-duration") + ReadPumpConfigurationAndControlMaxConstFlow() + : ReadAttribute("max-const-flow") { } - ~ReadThermostatTemperatureSetpointHoldDuration() {} + ~ReadPumpConfigurationAndControlMaxConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000024) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { -public: - WriteThermostatTemperatureSetpointHoldDuration() - : WriteAttribute("temperature-setpoint-hold-duration") - { - AddArgument("attr-name", "temperature-setpoint-hold-duration"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatTemperatureSetpointHoldDuration() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000A) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeTemperatureSetpointHoldDurationWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", - error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + if (error != nil) { + LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHoldDuration() - : SubscribeAttribute("temperature-setpoint-hold-duration") + SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + : SubscribeAttribute("max-const-flow") { } - ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000024) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51165,12 +52690,12 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params + [cluster subscribeAttributeMaxConstFlowWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51179,96 +52704,52 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc }; /* - * Attribute ThermostatProgrammingOperationMode + * Attribute MinConstTemp */ -class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { +class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { public: - ReadThermostatThermostatProgrammingOperationMode() - : ReadAttribute("thermostat-programming-operation-mode") + ReadPumpConfigurationAndControlMinConstTemp() + : ReadAttribute("min-const-temp") { } - ~ReadThermostatThermostatProgrammingOperationMode() {} + ~ReadPumpConfigurationAndControlMinConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000025) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { -public: - WriteThermostatThermostatProgrammingOperationMode() - : WriteAttribute("thermostat-programming-operation-mode") - { - AddArgument("attr-name", "thermostat-programming-operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatThermostatProgrammingOperationMode() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000B) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeThermostatProgrammingOperationModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "Thermostat ThermostatProgrammingOperationMode write Error", - error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + if (error != nil) { + LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatProgrammingOperationMode() - : SubscribeAttribute("thermostat-programming-operation-mode") + SubscribeAttributePumpConfigurationAndControlMinConstTemp() + : SubscribeAttribute("min-const-temp") { } - ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() {} + ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000025) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51279,12 +52760,12 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params + [cluster subscribeAttributeMinConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51293,29 +52774,29 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su }; /* - * Attribute ThermostatRunningState + * Attribute MaxConstTemp */ -class ReadThermostatThermostatRunningState : public ReadAttribute { +class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { public: - ReadThermostatThermostatRunningState() - : ReadAttribute("thermostat-running-state") + ReadPumpConfigurationAndControlMaxConstTemp() + : ReadAttribute("max-const-temp") { } - ~ReadThermostatThermostatRunningState() {} + ~ReadPumpConfigurationAndControlMaxConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000029) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ThermostatRunningState read Error", error); + LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); } SetCommandExitStatus(error); }]; @@ -51323,22 +52804,22 @@ class ReadThermostatThermostatRunningState : public ReadAttribute { } }; -class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatRunningState() - : SubscribeAttribute("thermostat-running-state") + SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + : SubscribeAttribute("max-const-temp") { } - ~SubscribeAttributeThermostatThermostatRunningState() {} + ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000029) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000000C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51349,12 +52830,12 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatRunningStateWithParams:params + [cluster subscribeAttributeMaxConstTempWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51363,29 +52844,29 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri }; /* - * Attribute SetpointChangeSource + * Attribute PumpStatus */ -class ReadThermostatSetpointChangeSource : public ReadAttribute { +class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { public: - ReadThermostatSetpointChangeSource() - : ReadAttribute("setpoint-change-source") + ReadPumpConfigurationAndControlPumpStatus() + : ReadAttribute("pump-status") { } - ~ReadThermostatSetpointChangeSource() {} + ~ReadPumpConfigurationAndControlPumpStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); if (error != nil) { - LogNSError("Thermostat SetpointChangeSource read Error", error); + LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -51393,22 +52874,22 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeSource() - : SubscribeAttribute("setpoint-change-source") + SubscribeAttributePumpConfigurationAndControlPumpStatus() + : SubscribeAttribute("pump-status") { } - ~SubscribeAttributeThermostatSetpointChangeSource() {} + ~SubscribeAttributePumpConfigurationAndControlPumpStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51419,12 +52900,12 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceWithParams:params + [cluster subscribeAttributePumpStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51433,29 +52914,29 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu }; /* - * Attribute SetpointChangeAmount + * Attribute EffectiveOperationMode */ -class ReadThermostatSetpointChangeAmount : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { public: - ReadThermostatSetpointChangeAmount() - : ReadAttribute("setpoint-change-amount") + ReadPumpConfigurationAndControlEffectiveOperationMode() + : ReadAttribute("effective-operation-mode") { } - ~ReadThermostatSetpointChangeAmount() {} + ~ReadPumpConfigurationAndControlEffectiveOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); if (error != nil) { - LogNSError("Thermostat SetpointChangeAmount read Error", error); + LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); } SetCommandExitStatus(error); }]; @@ -51463,22 +52944,22 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeAmount() - : SubscribeAttribute("setpoint-change-amount") + SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + : SubscribeAttribute("effective-operation-mode") { } - ~SubscribeAttributeThermostatSetpointChangeAmount() {} + ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51489,12 +52970,12 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeAmountWithParams:params + [cluster subscribeAttributeEffectiveOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51503,29 +52984,29 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu }; /* - * Attribute SetpointChangeSourceTimestamp + * Attribute EffectiveControlMode */ -class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { +class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { public: - ReadThermostatSetpointChangeSourceTimestamp() - : ReadAttribute("setpoint-change-source-timestamp") + ReadPumpConfigurationAndControlEffectiveControlMode() + : ReadAttribute("effective-control-mode") { } - ~ReadThermostatSetpointChangeSourceTimestamp() {} + ~ReadPumpConfigurationAndControlEffectiveControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error != nil) { - LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); + LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); } SetCommandExitStatus(error); }]; @@ -51533,22 +53014,22 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeSourceTimestamp() - : SubscribeAttribute("setpoint-change-source-timestamp") + SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + : SubscribeAttribute("effective-control-mode") { } - ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() {} + ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51559,12 +53040,12 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params + [cluster subscribeAttributeEffectiveControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51573,29 +53054,29 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri }; /* - * Attribute OccupiedSetback + * Attribute Capacity */ -class ReadThermostatOccupiedSetback : public ReadAttribute { +class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { public: - ReadThermostatOccupiedSetback() - : ReadAttribute("occupied-setback") + ReadPumpConfigurationAndControlCapacity() + : ReadAttribute("capacity") { } - ~ReadThermostatOccupiedSetback() {} + ~ReadPumpConfigurationAndControlCapacity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error != nil) { - LogNSError("Thermostat OccupiedSetback read Error", error); + LogNSError("PumpConfigurationAndControl Capacity read Error", error); } SetCommandExitStatus(error); }]; @@ -51603,62 +53084,92 @@ class ReadThermostatOccupiedSetback : public ReadAttribute { } }; -class WriteThermostatOccupiedSetback : public WriteAttribute { +class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { public: - WriteThermostatOccupiedSetback() - : WriteAttribute("occupied-setback") + SubscribeAttributePumpConfigurationAndControlCapacity() + : SubscribeAttribute("capacity") { - AddArgument("attr-name", "occupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedSetback() {} + ~SubscribeAttributePumpConfigurationAndControlCapacity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCapacityWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster writeAttributeOccupiedSetbackWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat OccupiedSetback write Error", error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; -private: - uint8_t mValue; +/* + * Attribute Speed + */ +class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { +public: + ReadPumpConfigurationAndControlSpeed() + : ReadAttribute("speed") + { + } + + ~ReadPumpConfigurationAndControlSpeed() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000014) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + if (error != nil) { + LogNSError("PumpConfigurationAndControl Speed read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetback() - : SubscribeAttribute("occupied-setback") + SubscribeAttributePumpConfigurationAndControlSpeed() + : SubscribeAttribute("speed") { } - ~SubscribeAttributeThermostatOccupiedSetback() {} + ~SubscribeAttributePumpConfigurationAndControlSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51669,12 +53180,12 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackWithParams:params + [cluster subscribeAttributeSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51683,29 +53194,29 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { }; /* - * Attribute OccupiedSetbackMin + * Attribute LifetimeRunningHours */ -class ReadThermostatOccupiedSetbackMin : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { public: - ReadThermostatOccupiedSetbackMin() - : ReadAttribute("occupied-setback-min") + ReadPumpConfigurationAndControlLifetimeRunningHours() + : ReadAttribute("lifetime-running-hours") { } - ~ReadThermostatOccupiedSetbackMin() {} + ~ReadPumpConfigurationAndControlLifetimeRunningHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error != nil) { - LogNSError("Thermostat OccupiedSetbackMin read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); } SetCommandExitStatus(error); }]; @@ -51713,22 +53224,63 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { +class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMin() - : SubscribeAttribute("occupied-setback-min") + WritePumpConfigurationAndControlLifetimeRunningHours() + : WriteAttribute("lifetime-running-hours") { + AddArgument("attr-name", "lifetime-running-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatOccupiedSetbackMin() {} + ~WritePumpConfigurationAndControlLifetimeRunningHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeLifetimeRunningHoursWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + : SubscribeAttribute("lifetime-running-hours") + { + } + + ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000015) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51739,12 +53291,12 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMinWithParams:params + [cluster subscribeAttributeLifetimeRunningHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51753,29 +53305,29 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute }; /* - * Attribute OccupiedSetbackMax + * Attribute Power */ -class ReadThermostatOccupiedSetbackMax : public ReadAttribute { +class ReadPumpConfigurationAndControlPower : public ReadAttribute { public: - ReadThermostatOccupiedSetbackMax() - : ReadAttribute("occupied-setback-max") + ReadPumpConfigurationAndControlPower() + : ReadAttribute("power") { } - ~ReadThermostatOccupiedSetbackMax() {} + ~ReadPumpConfigurationAndControlPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000036) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error != nil) { - LogNSError("Thermostat OccupiedSetbackMax read Error", error); + LogNSError("PumpConfigurationAndControl Power read Error", error); } SetCommandExitStatus(error); }]; @@ -51783,22 +53335,22 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMax() - : SubscribeAttribute("occupied-setback-max") + SubscribeAttributePumpConfigurationAndControlPower() + : SubscribeAttribute("power") { } - ~SubscribeAttributeThermostatOccupiedSetbackMax() {} + ~SubscribeAttributePumpConfigurationAndControlPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000036) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51809,12 +53361,12 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params + [cluster subscribeAttributePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51823,29 +53375,29 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute }; /* - * Attribute UnoccupiedSetback + * Attribute LifetimeEnergyConsumed */ -class ReadThermostatUnoccupiedSetback : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { public: - ReadThermostatUnoccupiedSetback() - : ReadAttribute("unoccupied-setback") + ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + : ReadAttribute("lifetime-energy-consumed") { } - ~ReadThermostatUnoccupiedSetback() {} + ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000037) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); } SetCommandExitStatus(error); }]; @@ -51853,36 +53405,38 @@ class ReadThermostatUnoccupiedSetback : public ReadAttribute { } }; -class WriteThermostatUnoccupiedSetback : public WriteAttribute { +class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { public: - WriteThermostatUnoccupiedSetback() - : WriteAttribute("unoccupied-setback") + WritePumpConfigurationAndControlLifetimeEnergyConsumed() + : WriteAttribute("lifetime-energy-consumed") { - AddArgument("attr-name", "unoccupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "lifetime-energy-consumed"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedSetback() {} + ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000037) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeUnoccupiedSetbackWithValue:value + [cluster + writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback write Error", error); + LogNSError( + "PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); } SetCommandExitStatus(error); }]; @@ -51890,25 +53444,25 @@ class WriteThermostatUnoccupiedSetback : public WriteAttribute { } private: - uint8_t mValue; + uint32_t mValue; }; -class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetback() - : SubscribeAttribute("unoccupied-setback") + SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + : SubscribeAttribute("lifetime-energy-consumed") { } - ~SubscribeAttributeThermostatUnoccupiedSetback() {} + ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000037) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51919,12 +53473,12 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackWithParams:params + [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -51933,29 +53487,29 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute }; /* - * Attribute UnoccupiedSetbackMin + * Attribute OperationMode */ -class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { +class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { public: - ReadThermostatUnoccupiedSetbackMin() - : ReadAttribute("unoccupied-setback-min") + ReadPumpConfigurationAndControlOperationMode() + : ReadAttribute("operation-mode") { } - ~ReadThermostatUnoccupiedSetbackMin() {} + ~ReadPumpConfigurationAndControlOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000038) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error != nil) { - LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); + LogNSError("PumpConfigurationAndControl OperationMode read Error", error); } SetCommandExitStatus(error); }]; @@ -51963,22 +53517,62 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { } }; -class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { +class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMin() - : SubscribeAttribute("unoccupied-setback-min") + WritePumpConfigurationAndControlOperationMode() + : WriteAttribute("operation-mode") { + AddArgument("attr-name", "operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatUnoccupiedSetbackMin() {} + ~WritePumpConfigurationAndControlOperationMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000038) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOperationModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlOperationMode() + : SubscribeAttribute("operation-mode") + { + } + + ~SubscribeAttributePumpConfigurationAndControlOperationMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000020) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -51989,12 +53583,12 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params + [cluster subscribeAttributeOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52003,29 +53597,29 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu }; /* - * Attribute UnoccupiedSetbackMax + * Attribute ControlMode */ -class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { +class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { public: - ReadThermostatUnoccupiedSetbackMax() - : ReadAttribute("unoccupied-setback-max") + ReadPumpConfigurationAndControlControlMode() + : ReadAttribute("control-mode") { } - ~ReadThermostatUnoccupiedSetbackMax() {} + ~ReadPumpConfigurationAndControlControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000039) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error != nil) { - LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); + LogNSError("PumpConfigurationAndControl ControlMode read Error", error); } SetCommandExitStatus(error); }]; @@ -52033,22 +53627,62 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { +class WritePumpConfigurationAndControlControlMode : public WriteAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMax() - : SubscribeAttribute("unoccupied-setback-max") + WritePumpConfigurationAndControlControlMode() + : WriteAttribute("control-mode") { + AddArgument("attr-name", "control-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatUnoccupiedSetbackMax() {} + ~WritePumpConfigurationAndControlControlMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000039) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeControlModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlControlMode() + : SubscribeAttribute("control-mode") + { + } + + ~SubscribeAttributePumpConfigurationAndControlControlMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x00000021) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52059,12 +53693,12 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params + [cluster subscribeAttributeControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52073,29 +53707,29 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu }; /* - * Attribute EmergencyHeatDelta + * Attribute GeneratedCommandList */ -class ReadThermostatEmergencyHeatDelta : public ReadAttribute { +class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { public: - ReadThermostatEmergencyHeatDelta() - : ReadAttribute("emergency-heat-delta") + ReadPumpConfigurationAndControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThermostatEmergencyHeatDelta() {} + ~ReadPumpConfigurationAndControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000003A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta read Error", error); + LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -52103,62 +53737,22 @@ class ReadThermostatEmergencyHeatDelta : public ReadAttribute { } }; -class WriteThermostatEmergencyHeatDelta : public WriteAttribute { -public: - WriteThermostatEmergencyHeatDelta() - : WriteAttribute("emergency-heat-delta") - { - AddArgument("attr-name", "emergency-heat-delta"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatEmergencyHeatDelta() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000003A) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeEmergencyHeatDeltaWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatEmergencyHeatDelta() - : SubscribeAttribute("emergency-heat-delta") + SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThermostatEmergencyHeatDelta() {} + ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52169,12 +53763,12 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52183,29 +53777,29 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute }; /* - * Attribute ACType + * Attribute AcceptedCommandList */ -class ReadThermostatACType : public ReadAttribute { +class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { public: - ReadThermostatACType() - : ReadAttribute("actype") + ReadPumpConfigurationAndControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThermostatACType() {} + ~ReadPumpConfigurationAndControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000040) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ACType read Error", error); + LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -52213,62 +53807,22 @@ class ReadThermostatACType : public ReadAttribute { } }; -class WriteThermostatACType : public WriteAttribute { -public: - WriteThermostatACType() - : WriteAttribute("actype") - { - AddArgument("attr-name", "actype"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000040) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACType write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACType : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThermostatACType() - : SubscribeAttribute("actype") + SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThermostatACType() {} + ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000040) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52279,12 +53833,12 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACTypeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52293,29 +53847,29 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { }; /* - * Attribute ACCapacity + * Attribute EventList */ -class ReadThermostatACCapacity : public ReadAttribute { +class ReadPumpConfigurationAndControlEventList : public ReadAttribute { public: - ReadThermostatACCapacity() - : ReadAttribute("accapacity") + ReadPumpConfigurationAndControlEventList() + : ReadAttribute("event-list") { } - ~ReadThermostatACCapacity() {} + ~ReadPumpConfigurationAndControlEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000041) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ACCapacity read Error", error); + LogNSError("PumpConfigurationAndControl EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -52323,62 +53877,22 @@ class ReadThermostatACCapacity : public ReadAttribute { } }; -class WriteThermostatACCapacity : public WriteAttribute { -public: - WriteThermostatACCapacity() - : WriteAttribute("accapacity") - { - AddArgument("attr-name", "accapacity"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000041) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeACCapacityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacity write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacity() - : SubscribeAttribute("accapacity") + SubscribeAttributePumpConfigurationAndControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThermostatACCapacity() {} + ~SubscribeAttributePumpConfigurationAndControlEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000041) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52389,12 +53903,12 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52403,29 +53917,29 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { }; /* - * Attribute ACRefrigerantType + * Attribute AttributeList */ -class ReadThermostatACRefrigerantType : public ReadAttribute { +class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { public: - ReadThermostatACRefrigerantType() - : ReadAttribute("acrefrigerant-type") + ReadPumpConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThermostatACRefrigerantType() {} + ~ReadPumpConfigurationAndControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000042) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ACRefrigerantType read Error", error); + LogNSError("PumpConfigurationAndControl AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -52433,62 +53947,22 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { } }; -class WriteThermostatACRefrigerantType : public WriteAttribute { -public: - WriteThermostatACRefrigerantType() - : WriteAttribute("acrefrigerant-type") - { - AddArgument("attr-name", "acrefrigerant-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACRefrigerantType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000042) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACRefrigerantTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACRefrigerantType write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThermostatACRefrigerantType() - : SubscribeAttribute("acrefrigerant-type") + SubscribeAttributePumpConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThermostatACRefrigerantType() {} + ~SubscribeAttributePumpConfigurationAndControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000042) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52499,12 +53973,12 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACRefrigerantTypeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52513,29 +53987,29 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute }; /* - * Attribute ACCompressorType + * Attribute FeatureMap */ -class ReadThermostatACCompressorType : public ReadAttribute { +class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { public: - ReadThermostatACCompressorType() - : ReadAttribute("accompressor-type") + ReadPumpConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThermostatACCompressorType() {} + ~ReadPumpConfigurationAndControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000043) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ACCompressorType read Error", error); + LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -52543,62 +54017,22 @@ class ReadThermostatACCompressorType : public ReadAttribute { } }; -class WriteThermostatACCompressorType : public WriteAttribute { -public: - WriteThermostatACCompressorType() - : WriteAttribute("accompressor-type") - { - AddArgument("attr-name", "accompressor-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCompressorType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000043) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACCompressorTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCompressorType write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCompressorType() - : SubscribeAttribute("accompressor-type") + SubscribeAttributePumpConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThermostatACCompressorType() {} + ~SubscribeAttributePumpConfigurationAndControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000043) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52609,12 +54043,12 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCompressorTypeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52623,29 +54057,29 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { }; /* - * Attribute ACErrorCode + * Attribute ClusterRevision */ -class ReadThermostatACErrorCode : public ReadAttribute { +class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { public: - ReadThermostatACErrorCode() - : ReadAttribute("acerror-code") + ReadPumpConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThermostatACErrorCode() {} + ~ReadPumpConfigurationAndControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000044) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ACErrorCode read Error", error); + LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -52653,62 +54087,22 @@ class ReadThermostatACErrorCode : public ReadAttribute { } }; -class WriteThermostatACErrorCode : public WriteAttribute { +class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { public: - WriteThermostatACErrorCode() - : WriteAttribute("acerror-code") + SubscribeAttributePumpConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") { - AddArgument("attr-name", "acerror-code"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatACErrorCode() {} + ~SubscribeAttributePumpConfigurationAndControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000044) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000200) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeACErrorCodeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACErrorCode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { -public: - SubscribeAttributeThermostatACErrorCode() - : SubscribeAttribute("acerror-code") - { - } - - ~SubscribeAttributeThermostatACErrorCode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000044) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52719,12 +54113,12 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACErrorCodeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52732,140 +54126,315 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster Thermostat | 0x0201 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute ACLouverPosition + * Command SetpointRaiseLower */ -class ReadThermostatACLouverPosition : public ReadAttribute { +class ThermostatSetpointRaiseLower : public ClusterCommand { public: - ReadThermostatACLouverPosition() - : ReadAttribute("aclouver-position") + ThermostatSetpointRaiseLower() + : ClusterCommand("setpoint-raise-lower") { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); } - ~ReadThermostatACLouverPosition() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; + params.amount = [NSNumber numberWithChar:mRequest.amount]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setpointRaiseLowerWithParams:params + completion:^(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::Thermostat::Commands::SetpointRaiseLower::Type mRequest; +}; + +/* + * Command SetWeeklySchedule + */ +class ThermostatSetWeeklySchedule : public ClusterCommand { +public: + ThermostatSetWeeklySchedule() + : ClusterCommand("set-weekly-schedule") + , mComplex_Transitions(&mRequest.transitions) + { + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); + ClusterCommand::AddArguments(); + } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000045) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); - if (error != nil) { - LogNSError("Thermostat ACLouverPosition read Error", error); + __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; + params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; + params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.transitions) { + MTRThermostatClusterThermostatScheduleTransition * newElement_0; + newElement_0 = [MTRThermostatClusterThermostatScheduleTransition new]; + newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; + params.transitions = array_0; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeeklyScheduleWithParams:params + completion:^(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::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_Transitions; }; -class WriteThermostatACLouverPosition : public WriteAttribute { +/* + * Command GetWeeklySchedule + */ +class ThermostatGetWeeklySchedule : public ClusterCommand { public: - WriteThermostatACLouverPosition() - : WriteAttribute("aclouver-position") + ThermostatGetWeeklySchedule() + : ClusterCommand("get-weekly-schedule") { - AddArgument("attr-name", "aclouver-position"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + ClusterCommand::AddArguments(); } - ~WriteThermostatACLouverPosition() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000045) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout + __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACLouverPositionWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACLouverPosition write Error", error); - } - SetCommandExitStatus(error); - }]; + params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; + params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeeklyScheduleWithParams:params + completion:^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } private: - uint8_t mValue; + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; }; -class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +/* + * Command ClearWeeklySchedule + */ +class ThermostatClearWeeklySchedule : public ClusterCommand { public: - SubscribeAttributeThermostatACLouverPosition() - : SubscribeAttribute("aclouver-position") + ThermostatClearWeeklySchedule() + : ClusterCommand("clear-weekly-schedule") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeThermostatACLouverPosition() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000045) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster clearWeeklyScheduleWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeACLouverPositionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute ACCoilTemperature + * Attribute LocalTemperature */ -class ReadThermostatACCoilTemperature : public ReadAttribute { +class ReadThermostatLocalTemperature : public ReadAttribute { public: - ReadThermostatACCoilTemperature() - : ReadAttribute("accoil-temperature") + ReadThermostatLocalTemperature() + : ReadAttribute("local-temperature") { } - ~ReadThermostatACCoilTemperature() {} + ~ReadThermostatLocalTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000046) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ACCoilTemperature read Error", error); + LogNSError("Thermostat LocalTemperature read Error", error); } SetCommandExitStatus(error); }]; @@ -52873,18 +54442,18 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { } }; -class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCoilTemperature() - : SubscribeAttribute("accoil-temperature") + SubscribeAttributeThermostatLocalTemperature() + : SubscribeAttribute("local-temperature") { } - ~SubscribeAttributeThermostatACCoilTemperature() {} + ~SubscribeAttributeThermostatLocalTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000046) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -52899,12 +54468,12 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCoilTemperatureWithParams:params + [cluster subscribeAttributeLocalTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); SetCommandExitStatus(error); }]; @@ -52913,29 +54482,29 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute }; /* - * Attribute ACCapacityformat + * Attribute OutdoorTemperature */ -class ReadThermostatACCapacityformat : public ReadAttribute { +class ReadThermostatOutdoorTemperature : public ReadAttribute { public: - ReadThermostatACCapacityformat() - : ReadAttribute("accapacityformat") + ReadThermostatOutdoorTemperature() + : ReadAttribute("outdoor-temperature") { } - ~ReadThermostatACCapacityformat() {} + ~ReadThermostatOutdoorTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000047) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ACCapacityformat read Error", error); + LogNSError("Thermostat OutdoorTemperature read Error", error); } SetCommandExitStatus(error); }]; @@ -52943,58 +54512,18 @@ class ReadThermostatACCapacityformat : public ReadAttribute { } }; -class WriteThermostatACCapacityformat : public WriteAttribute { -public: - WriteThermostatACCapacityformat() - : WriteAttribute("accapacityformat") - { - AddArgument("attr-name", "accapacityformat"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacityformat() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000047) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeACCapacityformatWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacityformat write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { +class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacityformat() - : SubscribeAttribute("accapacityformat") + SubscribeAttributeThermostatOutdoorTemperature() + : SubscribeAttribute("outdoor-temperature") { } - ~SubscribeAttributeThermostatACCapacityformat() {} + ~SubscribeAttributeThermostatOutdoorTemperature() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000047) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -53009,12 +54538,12 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityformatWithParams:params + [cluster subscribeAttributeOutdoorTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53023,29 +54552,29 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute Occupancy */ -class ReadThermostatGeneratedCommandList : public ReadAttribute { +class ReadThermostatOccupancy : public ReadAttribute { public: - ReadThermostatGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatOccupancy() + : ReadAttribute("occupancy") { } - ~ReadThermostatGeneratedCommandList() {} + ~ReadThermostatOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error != nil) { - LogNSError("Thermostat GeneratedCommandList read Error", error); + LogNSError("Thermostat Occupancy read Error", error); } SetCommandExitStatus(error); }]; @@ -53053,18 +54582,18 @@ class ReadThermostatGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { public: - SubscribeAttributeThermostatGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThermostatOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributeThermostatGeneratedCommandList() {} + ~SubscribeAttributeThermostatOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -53079,12 +54608,12 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Occupancy response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53093,29 +54622,29 @@ class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribu }; /* - * Attribute AcceptedCommandList + * Attribute AbsMinHeatSetpointLimit */ -class ReadThermostatAcceptedCommandList : public ReadAttribute { +class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { public: - ReadThermostatAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatAbsMinHeatSetpointLimit() + : ReadAttribute("abs-min-heat-setpoint-limit") { } - ~ReadThermostatAcceptedCommandList() {} + ~ReadThermostatAbsMinHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("Thermostat AcceptedCommandList read Error", error); + LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -53123,18 +54652,18 @@ class ReadThermostatAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeThermostatAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + : SubscribeAttribute("abs-min-heat-setpoint-limit") { } - ~SubscribeAttributeThermostatAcceptedCommandList() {} + ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -53149,12 +54678,12 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53163,29 +54692,29 @@ class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribut }; /* - * Attribute AttributeList + * Attribute AbsMaxHeatSetpointLimit */ -class ReadThermostatAttributeList : public ReadAttribute { +class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { public: - ReadThermostatAttributeList() - : ReadAttribute("attribute-list") + ReadThermostatAbsMaxHeatSetpointLimit() + : ReadAttribute("abs-max-heat-setpoint-limit") { } - ~ReadThermostatAttributeList() {} + ~ReadThermostatAbsMaxHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("Thermostat AttributeList read Error", error); + LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -53193,18 +54722,18 @@ class ReadThermostatAttributeList : public ReadAttribute { } }; -class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeThermostatAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + : SubscribeAttribute("abs-max-heat-setpoint-limit") { } - ~SubscribeAttributeThermostatAttributeList() {} + ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -53219,12 +54748,12 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53233,29 +54762,29 @@ class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute AbsMinCoolSetpointLimit */ -class ReadThermostatFeatureMap : public ReadAttribute { +class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { public: - ReadThermostatFeatureMap() - : ReadAttribute("feature-map") + ReadThermostatAbsMinCoolSetpointLimit() + : ReadAttribute("abs-min-cool-setpoint-limit") { } - ~ReadThermostatFeatureMap() {} + ~ReadThermostatAbsMinCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("Thermostat FeatureMap read Error", error); + LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -53263,18 +54792,18 @@ class ReadThermostatFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeThermostatFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + : SubscribeAttribute("abs-min-cool-setpoint-limit") { } - ~SubscribeAttributeThermostatFeatureMap() {} + ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -53289,12 +54818,12 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53303,29 +54832,29 @@ class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute AbsMaxCoolSetpointLimit */ -class ReadThermostatClusterRevision : public ReadAttribute { +class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { public: - ReadThermostatClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatAbsMaxCoolSetpointLimit() + : ReadAttribute("abs-max-cool-setpoint-limit") { } - ~ReadThermostatClusterRevision() {} + ~ReadThermostatAbsMaxCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error != nil) { - LogNSError("Thermostat ClusterRevision read Error", error); + LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); } SetCommandExitStatus(error); }]; @@ -53333,18 +54862,18 @@ class ReadThermostatClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributeThermostatClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + : SubscribeAttribute("abs-max-cool-setpoint-limit") { } - ~SubscribeAttributeThermostatClusterRevision() {} + ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) @@ -53359,12 +54888,12 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53372,57 +54901,100 @@ class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster FanControl | 0x0202 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * FanMode | 0x0000 | -| * FanModeSequence | 0x0001 | -| * PercentSetting | 0x0002 | -| * PercentCurrent | 0x0003 | -| * SpeedMax | 0x0004 | -| * SpeedSetting | 0x0005 | -| * SpeedCurrent | 0x0006 | -| * RockSupport | 0x0007 | -| * RockSetting | 0x0008 | -| * WindSupport | 0x0009 | -| * WindSetting | 0x000A | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +/* + * Attribute PICoolingDemand + */ +class ReadThermostatPICoolingDemand : public ReadAttribute { +public: + ReadThermostatPICoolingDemand() + : ReadAttribute("picooling-demand") + { + } + + ~ReadThermostatPICoolingDemand() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000007) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat PICoolingDemand read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { +public: + SubscribeAttributeThermostatPICoolingDemand() + : SubscribeAttribute("picooling-demand") + { + } + + ~SubscribeAttributeThermostatPICoolingDemand() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000007) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributePICoolingDemandWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; /* - * Attribute FanMode + * Attribute PIHeatingDemand */ -class ReadFanControlFanMode : public ReadAttribute { +class ReadThermostatPIHeatingDemand : public ReadAttribute { public: - ReadFanControlFanMode() - : ReadAttribute("fan-mode") + ReadThermostatPIHeatingDemand() + : ReadAttribute("piheating-demand") { } - ~ReadFanControlFanMode() {} + ~ReadThermostatPIHeatingDemand() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); + [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error != nil) { - LogNSError("FanControl FanMode read Error", error); + LogNSError("Thermostat PIHeatingDemand read Error", error); } SetCommandExitStatus(error); }]; @@ -53430,23 +55002,93 @@ class ReadFanControlFanMode : public ReadAttribute { } }; -class WriteFanControlFanMode : public WriteAttribute { +class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { public: - WriteFanControlFanMode() - : WriteAttribute("fan-mode") + SubscribeAttributeThermostatPIHeatingDemand() + : SubscribeAttribute("piheating-demand") { - AddArgument("attr-name", "fan-mode"); + } + + ~SubscribeAttributeThermostatPIHeatingDemand() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000008) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributePIHeatingDemandWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute HVACSystemTypeConfiguration + */ +class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { +public: + ReadThermostatHVACSystemTypeConfiguration() + : ReadAttribute("hvacsystem-type-configuration") + { + } + + ~ReadThermostatHVACSystemTypeConfiguration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000009) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { +public: + WriteThermostatHVACSystemTypeConfiguration() + : WriteAttribute("hvacsystem-type-configuration") + { + AddArgument("attr-name", "hvacsystem-type-configuration"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteFanControlFanMode() {} + ~WriteThermostatHVACSystemTypeConfiguration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; @@ -53455,14 +55097,15 @@ class WriteFanControlFanMode : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeFanModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanMode write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeHVACSystemTypeConfigurationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -53470,20 +55113,20 @@ class WriteFanControlFanMode : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { +class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { public: - SubscribeAttributeFanControlFanMode() - : SubscribeAttribute("fan-mode") + SubscribeAttributeThermostatHVACSystemTypeConfiguration() + : SubscribeAttribute("hvacsystem-type-configuration") { } - ~SubscribeAttributeFanControlFanMode() {} + ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -53496,12 +55139,12 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFanModeWithParams:params + [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanMode response %@", [value description]); + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53510,29 +55153,140 @@ class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { }; /* - * Attribute FanModeSequence + * Attribute LocalTemperatureCalibration */ -class ReadFanControlFanModeSequence : public ReadAttribute { +class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { public: - ReadFanControlFanModeSequence() - : ReadAttribute("fan-mode-sequence") + ReadThermostatLocalTemperatureCalibration() + : ReadAttribute("local-temperature-calibration") { } - ~ReadFanControlFanModeSequence() {} + ~ReadThermostatLocalTemperatureCalibration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); + [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); if (error != nil) { - LogNSError("FanControl FanModeSequence read Error", error); + LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { +public: + WriteThermostatLocalTemperatureCalibration() + : WriteAttribute("local-temperature-calibration") + { + AddArgument("attr-name", "local-temperature-calibration"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatLocalTemperatureCalibration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000010) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + + [cluster + writeAttributeLocalTemperatureCalibrationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int8_t mValue; +}; + +class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatLocalTemperatureCalibration() + : SubscribeAttribute("local-temperature-calibration") + { + } + + ~SubscribeAttributeThermostatLocalTemperatureCalibration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000010) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute OccupiedCoolingSetpoint + */ +class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { +public: + ReadThermostatOccupiedCoolingSetpoint() + : ReadAttribute("occupied-cooling-setpoint") + { + } + + ~ReadThermostatOccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000011) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); } SetCommandExitStatus(error); }]; @@ -53540,62 +55294,7448 @@ class ReadFanControlFanModeSequence : public ReadAttribute { } }; -class WriteFanControlFanModeSequence : public WriteAttribute { +class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { +public: + WriteThermostatOccupiedCoolingSetpoint() + : WriteAttribute("occupied-cooling-setpoint") + { + AddArgument("attr-name", "occupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatOccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000011) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeOccupiedCoolingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedCoolingSetpoint() + : SubscribeAttribute("occupied-cooling-setpoint") + { + } + + ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000011) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute OccupiedHeatingSetpoint + */ +class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { +public: + ReadThermostatOccupiedHeatingSetpoint() + : ReadAttribute("occupied-heating-setpoint") + { + } + + ~ReadThermostatOccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000012) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { +public: + WriteThermostatOccupiedHeatingSetpoint() + : WriteAttribute("occupied-heating-setpoint") + { + AddArgument("attr-name", "occupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatOccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000012) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeOccupiedHeatingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedHeatingSetpoint() + : SubscribeAttribute("occupied-heating-setpoint") + { + } + + ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000012) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute UnoccupiedCoolingSetpoint + */ +class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { +public: + ReadThermostatUnoccupiedCoolingSetpoint() + : ReadAttribute("unoccupied-cooling-setpoint") + { + } + + ~ReadThermostatUnoccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000013) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { +public: + WriteThermostatUnoccupiedCoolingSetpoint() + : WriteAttribute("unoccupied-cooling-setpoint") + { + AddArgument("attr-name", "unoccupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatUnoccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000013) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster + writeAttributeUnoccupiedCoolingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + : SubscribeAttribute("unoccupied-cooling-setpoint") + { + } + + ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000013) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute UnoccupiedHeatingSetpoint + */ +class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { +public: + ReadThermostatUnoccupiedHeatingSetpoint() + : ReadAttribute("unoccupied-heating-setpoint") + { + } + + ~ReadThermostatUnoccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000014) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { +public: + WriteThermostatUnoccupiedHeatingSetpoint() + : WriteAttribute("unoccupied-heating-setpoint") + { + AddArgument("attr-name", "unoccupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatUnoccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000014) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster + writeAttributeUnoccupiedHeatingSetpointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + : SubscribeAttribute("unoccupied-heating-setpoint") + { + } + + ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000014) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MinHeatSetpointLimit + */ +class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { +public: + ReadThermostatMinHeatSetpointLimit() + : ReadAttribute("min-heat-setpoint-limit") + { + } + + ~ReadThermostatMinHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000015) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat MinHeatSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { +public: + WriteThermostatMinHeatSetpointLimit() + : WriteAttribute("min-heat-setpoint-limit") + { + AddArgument("attr-name", "min-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatMinHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000015) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMinHeatSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinHeatSetpointLimit() + : SubscribeAttribute("min-heat-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMinHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000015) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MaxHeatSetpointLimit + */ +class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { +public: + ReadThermostatMaxHeatSetpointLimit() + : ReadAttribute("max-heat-setpoint-limit") + { + } + + ~ReadThermostatMaxHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000016) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { +public: + WriteThermostatMaxHeatSetpointLimit() + : WriteAttribute("max-heat-setpoint-limit") + { + AddArgument("attr-name", "max-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatMaxHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000016) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMaxHeatSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMaxHeatSetpointLimit() + : SubscribeAttribute("max-heat-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMaxHeatSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000016) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MinCoolSetpointLimit + */ +class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { +public: + ReadThermostatMinCoolSetpointLimit() + : ReadAttribute("min-cool-setpoint-limit") + { + } + + ~ReadThermostatMinCoolSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000017) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat MinCoolSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { +public: + WriteThermostatMinCoolSetpointLimit() + : WriteAttribute("min-cool-setpoint-limit") + { + AddArgument("attr-name", "min-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatMinCoolSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000017) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMinCoolSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinCoolSetpointLimit() + : SubscribeAttribute("min-cool-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMinCoolSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000017) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MaxCoolSetpointLimit + */ +class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { +public: + ReadThermostatMaxCoolSetpointLimit() + : ReadAttribute("max-cool-setpoint-limit") + { + } + + ~ReadThermostatMaxCoolSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000018) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { +public: + WriteThermostatMaxCoolSetpointLimit() + : WriteAttribute("max-cool-setpoint-limit") + { + AddArgument("attr-name", "max-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatMaxCoolSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000018) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithShort:mValue]; + + [cluster writeAttributeMaxCoolSetpointLimitWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMaxCoolSetpointLimit() + : SubscribeAttribute("max-cool-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMaxCoolSetpointLimit() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000018) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute MinSetpointDeadBand + */ +class ReadThermostatMinSetpointDeadBand : public ReadAttribute { +public: + ReadThermostatMinSetpointDeadBand() + : ReadAttribute("min-setpoint-dead-band") + { + } + + ~ReadThermostatMinSetpointDeadBand() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000019) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat MinSetpointDeadBand read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatMinSetpointDeadBand : public WriteAttribute { +public: + WriteThermostatMinSetpointDeadBand() + : WriteAttribute("min-setpoint-dead-band") + { + AddArgument("attr-name", "min-setpoint-dead-band"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatMinSetpointDeadBand() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000019) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; + + [cluster writeAttributeMinSetpointDeadBandWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinSetpointDeadBand write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int8_t mValue; +}; + +class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinSetpointDeadBand() + : SubscribeAttribute("min-setpoint-dead-band") + { + } + + ~SubscribeAttributeThermostatMinSetpointDeadBand() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000019) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeMinSetpointDeadBandWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute RemoteSensing + */ +class ReadThermostatRemoteSensing : public ReadAttribute { +public: + ReadThermostatRemoteSensing() + : ReadAttribute("remote-sensing") + { + } + + ~ReadThermostatRemoteSensing() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat RemoteSensing read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatRemoteSensing : public WriteAttribute { +public: + WriteThermostatRemoteSensing() + : WriteAttribute("remote-sensing") + { + AddArgument("attr-name", "remote-sensing"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatRemoteSensing() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeRemoteSensingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat RemoteSensing write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { +public: + SubscribeAttributeThermostatRemoteSensing() + : SubscribeAttribute("remote-sensing") + { + } + + ~SubscribeAttributeThermostatRemoteSensing() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeRemoteSensingWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ControlSequenceOfOperation + */ +class ReadThermostatControlSequenceOfOperation : public ReadAttribute { +public: + ReadThermostatControlSequenceOfOperation() + : ReadAttribute("control-sequence-of-operation") + { + } + + ~ReadThermostatControlSequenceOfOperation() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001B) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatControlSequenceOfOperation : public WriteAttribute { +public: + WriteThermostatControlSequenceOfOperation() + : WriteAttribute("control-sequence-of-operation") + { + AddArgument("attr-name", "control-sequence-of-operation"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatControlSequenceOfOperation() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeControlSequenceOfOperationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { +public: + SubscribeAttributeThermostatControlSequenceOfOperation() + : SubscribeAttribute("control-sequence-of-operation") + { + } + + ~SubscribeAttributeThermostatControlSequenceOfOperation() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeControlSequenceOfOperationWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SystemMode + */ +class ReadThermostatSystemMode : public ReadAttribute { +public: + ReadThermostatSystemMode() + : ReadAttribute("system-mode") + { + } + + ~ReadThermostatSystemMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001C) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SystemMode response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat SystemMode read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatSystemMode : public WriteAttribute { +public: + WriteThermostatSystemMode() + : WriteAttribute("system-mode") + { + AddArgument("attr-name", "system-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatSystemMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000001C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSystemModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat SystemMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatSystemMode() + : SubscribeAttribute("system-mode") + { + } + + ~SubscribeAttributeThermostatSystemMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSystemModeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SystemMode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ThermostatRunningMode + */ +class ReadThermostatThermostatRunningMode : public ReadAttribute { +public: + ReadThermostatThermostatRunningMode() + : ReadAttribute("thermostat-running-mode") + { + } + + ~ReadThermostatThermostatRunningMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000001E) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ThermostatRunningMode read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatThermostatRunningMode() + : SubscribeAttribute("thermostat-running-mode") + { + } + + ~SubscribeAttributeThermostatThermostatRunningMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000001E) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeThermostatRunningModeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute StartOfWeek + */ +class ReadThermostatStartOfWeek : public ReadAttribute { +public: + ReadThermostatStartOfWeek() + : ReadAttribute("start-of-week") + { + } + + ~ReadThermostatStartOfWeek() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000020) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat StartOfWeek read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { +public: + SubscribeAttributeThermostatStartOfWeek() + : SubscribeAttribute("start-of-week") + { + } + + ~SubscribeAttributeThermostatStartOfWeek() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000020) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeStartOfWeekWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute NumberOfWeeklyTransitions + */ +class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { +public: + ReadThermostatNumberOfWeeklyTransitions() + : ReadAttribute("number-of-weekly-transitions") + { + } + + ~ReadThermostatNumberOfWeeklyTransitions() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000021) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { +public: + SubscribeAttributeThermostatNumberOfWeeklyTransitions() + : SubscribeAttribute("number-of-weekly-transitions") + { + } + + ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000021) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNumberOfWeeklyTransitionsWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute NumberOfDailyTransitions + */ +class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { +public: + ReadThermostatNumberOfDailyTransitions() + : ReadAttribute("number-of-daily-transitions") + { + } + + ~ReadThermostatNumberOfDailyTransitions() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000022) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { +public: + SubscribeAttributeThermostatNumberOfDailyTransitions() + : SubscribeAttribute("number-of-daily-transitions") + { + } + + ~SubscribeAttributeThermostatNumberOfDailyTransitions() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000022) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute TemperatureSetpointHold + */ +class ReadThermostatTemperatureSetpointHold : public ReadAttribute { +public: + ReadThermostatTemperatureSetpointHold() + : ReadAttribute("temperature-setpoint-hold") + { + } + + ~ReadThermostatTemperatureSetpointHold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000023) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHold read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatTemperatureSetpointHold : public WriteAttribute { +public: + WriteThermostatTemperatureSetpointHold() + : WriteAttribute("temperature-setpoint-hold") + { + AddArgument("attr-name", "temperature-setpoint-hold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatTemperatureSetpointHold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000023) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeTemperatureSetpointHoldWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHold write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { +public: + SubscribeAttributeThermostatTemperatureSetpointHold() + : SubscribeAttribute("temperature-setpoint-hold") + { + } + + ~SubscribeAttributeThermostatTemperatureSetpointHold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000023) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute TemperatureSetpointHoldDuration + */ +class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { +public: + ReadThermostatTemperatureSetpointHoldDuration() + : ReadAttribute("temperature-setpoint-hold-duration") + { + } + + ~ReadThermostatTemperatureSetpointHoldDuration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000024) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { +public: + WriteThermostatTemperatureSetpointHoldDuration() + : WriteAttribute("temperature-setpoint-hold-duration") + { + AddArgument("attr-name", "temperature-setpoint-hold-duration"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatTemperatureSetpointHoldDuration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000024) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeTemperatureSetpointHoldDurationWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { +public: + SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + : SubscribeAttribute("temperature-setpoint-hold-duration") + { + } + + ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000024) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ThermostatProgrammingOperationMode + */ +class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { +public: + ReadThermostatThermostatProgrammingOperationMode() + : ReadAttribute("thermostat-programming-operation-mode") + { + } + + ~ReadThermostatThermostatProgrammingOperationMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000025) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { +public: + WriteThermostatThermostatProgrammingOperationMode() + : WriteAttribute("thermostat-programming-operation-mode") + { + AddArgument("attr-name", "thermostat-programming-operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatThermostatProgrammingOperationMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000025) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeThermostatProgrammingOperationModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "Thermostat ThermostatProgrammingOperationMode write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatThermostatProgrammingOperationMode() + : SubscribeAttribute("thermostat-programming-operation-mode") + { + } + + ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000025) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ThermostatRunningState + */ +class ReadThermostatThermostatRunningState : public ReadAttribute { +public: + ReadThermostatThermostatRunningState() + : ReadAttribute("thermostat-running-state") + { + } + + ~ReadThermostatThermostatRunningState() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000029) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ThermostatRunningState read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { +public: + SubscribeAttributeThermostatThermostatRunningState() + : SubscribeAttribute("thermostat-running-state") + { + } + + ~SubscribeAttributeThermostatThermostatRunningState() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000029) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeThermostatRunningStateWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SetpointChangeSource + */ +class ReadThermostatSetpointChangeSource : public ReadAttribute { +public: + ReadThermostatSetpointChangeSource() + : ReadAttribute("setpoint-change-source") + { + } + + ~ReadThermostatSetpointChangeSource() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000030) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat SetpointChangeSource read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { +public: + SubscribeAttributeThermostatSetpointChangeSource() + : SubscribeAttribute("setpoint-change-source") + { + } + + ~SubscribeAttributeThermostatSetpointChangeSource() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000030) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSetpointChangeSourceWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SetpointChangeAmount + */ +class ReadThermostatSetpointChangeAmount : public ReadAttribute { +public: + ReadThermostatSetpointChangeAmount() + : ReadAttribute("setpoint-change-amount") + { + } + + ~ReadThermostatSetpointChangeAmount() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000031) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat SetpointChangeAmount read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { +public: + SubscribeAttributeThermostatSetpointChangeAmount() + : SubscribeAttribute("setpoint-change-amount") + { + } + + ~SubscribeAttributeThermostatSetpointChangeAmount() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000031) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSetpointChangeAmountWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SetpointChangeSourceTimestamp + */ +class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { +public: + ReadThermostatSetpointChangeSourceTimestamp() + : ReadAttribute("setpoint-change-source-timestamp") + { + } + + ~ReadThermostatSetpointChangeSourceTimestamp() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000032) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { +public: + SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + : SubscribeAttribute("setpoint-change-source-timestamp") + { + } + + ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000032) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute OccupiedSetback + */ +class ReadThermostatOccupiedSetback : public ReadAttribute { +public: + ReadThermostatOccupiedSetback() + : ReadAttribute("occupied-setback") + { + } + + ~ReadThermostatOccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000034) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat OccupiedSetback read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatOccupiedSetback : public WriteAttribute { +public: + WriteThermostatOccupiedSetback() + : WriteAttribute("occupied-setback") + { + AddArgument("attr-name", "occupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatOccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000034) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeOccupiedSetbackWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedSetback() + : SubscribeAttribute("occupied-setback") + { + } + + ~SubscribeAttributeThermostatOccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000034) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOccupiedSetbackWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute OccupiedSetbackMin + */ +class ReadThermostatOccupiedSetbackMin : public ReadAttribute { +public: + ReadThermostatOccupiedSetbackMin() + : ReadAttribute("occupied-setback-min") + { + } + + ~ReadThermostatOccupiedSetbackMin() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000035) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat OccupiedSetbackMin read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedSetbackMin() + : SubscribeAttribute("occupied-setback-min") + { + } + + ~SubscribeAttributeThermostatOccupiedSetbackMin() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000035) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOccupiedSetbackMinWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute OccupiedSetbackMax + */ +class ReadThermostatOccupiedSetbackMax : public ReadAttribute { +public: + ReadThermostatOccupiedSetbackMax() + : ReadAttribute("occupied-setback-max") + { + } + + ~ReadThermostatOccupiedSetbackMax() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000036) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat OccupiedSetbackMax read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedSetbackMax() + : SubscribeAttribute("occupied-setback-max") + { + } + + ~SubscribeAttributeThermostatOccupiedSetbackMax() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000036) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute UnoccupiedSetback + */ +class ReadThermostatUnoccupiedSetback : public ReadAttribute { +public: + ReadThermostatUnoccupiedSetback() + : ReadAttribute("unoccupied-setback") + { + } + + ~ReadThermostatUnoccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000037) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat UnoccupiedSetback read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatUnoccupiedSetback : public WriteAttribute { +public: + WriteThermostatUnoccupiedSetback() + : WriteAttribute("unoccupied-setback") + { + AddArgument("attr-name", "unoccupied-setback"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatUnoccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000037) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeUnoccupiedSetbackWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedSetback write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedSetback() + : SubscribeAttribute("unoccupied-setback") + { + } + + ~SubscribeAttributeThermostatUnoccupiedSetback() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000037) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUnoccupiedSetbackWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute UnoccupiedSetbackMin + */ +class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { +public: + ReadThermostatUnoccupiedSetbackMin() + : ReadAttribute("unoccupied-setback-min") + { + } + + ~ReadThermostatUnoccupiedSetbackMin() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000038) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedSetbackMin() + : SubscribeAttribute("unoccupied-setback-min") + { + } + + ~SubscribeAttributeThermostatUnoccupiedSetbackMin() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000038) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute UnoccupiedSetbackMax + */ +class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { +public: + ReadThermostatUnoccupiedSetbackMax() + : ReadAttribute("unoccupied-setback-max") + { + } + + ~ReadThermostatUnoccupiedSetbackMax() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000039) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedSetbackMax() + : SubscribeAttribute("unoccupied-setback-max") + { + } + + ~SubscribeAttributeThermostatUnoccupiedSetbackMax() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000039) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EmergencyHeatDelta + */ +class ReadThermostatEmergencyHeatDelta : public ReadAttribute { +public: + ReadThermostatEmergencyHeatDelta() + : ReadAttribute("emergency-heat-delta") + { + } + + ~ReadThermostatEmergencyHeatDelta() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000003A) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat EmergencyHeatDelta read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatEmergencyHeatDelta : public WriteAttribute { +public: + WriteThermostatEmergencyHeatDelta() + : WriteAttribute("emergency-heat-delta") + { + AddArgument("attr-name", "emergency-heat-delta"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatEmergencyHeatDelta() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x0000003A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeEmergencyHeatDeltaWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat EmergencyHeatDelta write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { +public: + SubscribeAttributeThermostatEmergencyHeatDelta() + : SubscribeAttribute("emergency-heat-delta") + { + } + + ~SubscribeAttributeThermostatEmergencyHeatDelta() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACType + */ +class ReadThermostatACType : public ReadAttribute { +public: + ReadThermostatACType() + : ReadAttribute("actype") + { + } + + ~ReadThermostatACType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000040) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACType response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACType read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACType : public WriteAttribute { +public: + WriteThermostatACType() + : WriteAttribute("actype") + { + AddArgument("attr-name", "actype"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000040) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACType write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACType : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACType() + : SubscribeAttribute("actype") + { + } + + ~SubscribeAttributeThermostatACType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000040) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACTypeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACType response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACCapacity + */ +class ReadThermostatACCapacity : public ReadAttribute { +public: + ReadThermostatACCapacity() + : ReadAttribute("accapacity") + { + } + + ~ReadThermostatACCapacity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000041) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacity response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACCapacity read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACCapacity : public WriteAttribute { +public: + WriteThermostatACCapacity() + : WriteAttribute("accapacity") + { + AddArgument("attr-name", "accapacity"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACCapacity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000041) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeACCapacityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacity write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACCapacity() + : SubscribeAttribute("accapacity") + { + } + + ~SubscribeAttributeThermostatACCapacity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000041) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACCapacityWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacity response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACRefrigerantType + */ +class ReadThermostatACRefrigerantType : public ReadAttribute { +public: + ReadThermostatACRefrigerantType() + : ReadAttribute("acrefrigerant-type") + { + } + + ~ReadThermostatACRefrigerantType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000042) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACRefrigerantType read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACRefrigerantType : public WriteAttribute { +public: + WriteThermostatACRefrigerantType() + : WriteAttribute("acrefrigerant-type") + { + AddArgument("attr-name", "acrefrigerant-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACRefrigerantType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000042) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACRefrigerantTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACRefrigerantType write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACRefrigerantType() + : SubscribeAttribute("acrefrigerant-type") + { + } + + ~SubscribeAttributeThermostatACRefrigerantType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000042) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACRefrigerantTypeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACCompressorType + */ +class ReadThermostatACCompressorType : public ReadAttribute { +public: + ReadThermostatACCompressorType() + : ReadAttribute("accompressor-type") + { + } + + ~ReadThermostatACCompressorType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000043) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACCompressorType read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACCompressorType : public WriteAttribute { +public: + WriteThermostatACCompressorType() + : WriteAttribute("accompressor-type") + { + AddArgument("attr-name", "accompressor-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACCompressorType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000043) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACCompressorTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCompressorType write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACCompressorType() + : SubscribeAttribute("accompressor-type") + { + } + + ~SubscribeAttributeThermostatACCompressorType() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000043) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACCompressorTypeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACErrorCode + */ +class ReadThermostatACErrorCode : public ReadAttribute { +public: + ReadThermostatACErrorCode() + : ReadAttribute("acerror-code") + { + } + + ~ReadThermostatACErrorCode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000044) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACErrorCode read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACErrorCode : public WriteAttribute { +public: + WriteThermostatACErrorCode() + : WriteAttribute("acerror-code") + { + AddArgument("attr-name", "acerror-code"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACErrorCode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000044) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeACErrorCodeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACErrorCode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACErrorCode() + : SubscribeAttribute("acerror-code") + { + } + + ~SubscribeAttributeThermostatACErrorCode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000044) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACErrorCodeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACLouverPosition + */ +class ReadThermostatACLouverPosition : public ReadAttribute { +public: + ReadThermostatACLouverPosition() + : ReadAttribute("aclouver-position") + { + } + + ~ReadThermostatACLouverPosition() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000045) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACLouverPosition read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACLouverPosition : public WriteAttribute { +public: + WriteThermostatACLouverPosition() + : WriteAttribute("aclouver-position") + { + AddArgument("attr-name", "aclouver-position"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACLouverPosition() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000045) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACLouverPositionWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACLouverPosition write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACLouverPosition() + : SubscribeAttribute("aclouver-position") + { + } + + ~SubscribeAttributeThermostatACLouverPosition() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000045) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACLouverPositionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACCoilTemperature + */ +class ReadThermostatACCoilTemperature : public ReadAttribute { +public: + ReadThermostatACCoilTemperature() + : ReadAttribute("accoil-temperature") + { + } + + ~ReadThermostatACCoilTemperature() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000046) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACCoilTemperature read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACCoilTemperature() + : SubscribeAttribute("accoil-temperature") + { + } + + ~SubscribeAttributeThermostatACCoilTemperature() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000046) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACCoilTemperatureWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ACCapacityformat + */ +class ReadThermostatACCapacityformat : public ReadAttribute { +public: + ReadThermostatACCapacityformat() + : ReadAttribute("accapacityformat") + { + } + + ~ReadThermostatACCapacityformat() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x00000047) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ACCapacityformat read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACCapacityformat : public WriteAttribute { +public: + WriteThermostatACCapacityformat() + : WriteAttribute("accapacityformat") + { + AddArgument("attr-name", "accapacityformat"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACCapacityformat() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) WriteAttribute (0x00000047) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeACCapacityformatWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCapacityformat write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACCapacityformat() + : SubscribeAttribute("accapacityformat") + { + } + + ~SubscribeAttributeThermostatACCapacityformat() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x00000047) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeACCapacityformatWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadThermostatGeneratedCommandList : public ReadAttribute { +public: + ReadThermostatGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadThermostatGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeThermostatGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadThermostatAcceptedCommandList : public ReadAttribute { +public: + ReadThermostatAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadThermostatAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeThermostatAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadThermostatEventList : public ReadAttribute { +public: + ReadThermostatEventList() + : ReadAttribute("event-list") + { + } + + ~ReadThermostatEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EventList response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatEventList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeThermostatEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadThermostatAttributeList : public ReadAttribute { +public: + ReadThermostatAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadThermostatAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeThermostatAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadThermostatFeatureMap : public ReadAttribute { +public: + ReadThermostatFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadThermostatFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeThermostatFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeThermostatFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadThermostatClusterRevision : public ReadAttribute { +public: + ReadThermostatClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadThermostatClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("Thermostat ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeThermostatClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeThermostatClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000201) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/*----------------------------------------------------------------------------*\ +| Cluster FanControl | 0x0202 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * FanMode | 0x0000 | +| * FanModeSequence | 0x0001 | +| * PercentSetting | 0x0002 | +| * PercentCurrent | 0x0003 | +| * SpeedMax | 0x0004 | +| * SpeedSetting | 0x0005 | +| * SpeedCurrent | 0x0006 | +| * RockSupport | 0x0007 | +| * RockSetting | 0x0008 | +| * WindSupport | 0x0009 | +| * WindSetting | 0x000A | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute FanMode + */ +class ReadFanControlFanMode : public ReadAttribute { +public: + ReadFanControlFanMode() + : ReadAttribute("fan-mode") + { + } + + ~ReadFanControlFanMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFanModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanMode response %@", [value description]); + if (error != nil) { + LogNSError("FanControl FanMode read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteFanControlFanMode : public WriteAttribute { +public: + WriteFanControlFanMode() + : WriteAttribute("fan-mode") + { + AddArgument("attr-name", "fan-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteFanControlFanMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeFanModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanMode write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlFanMode : public SubscribeAttribute { +public: + SubscribeAttributeFanControlFanMode() + : SubscribeAttribute("fan-mode") + { + } + + ~SubscribeAttributeFanControlFanMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFanModeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanMode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FanModeSequence + */ +class ReadFanControlFanModeSequence : public ReadAttribute { +public: + ReadFanControlFanModeSequence() + : ReadAttribute("fan-mode-sequence") + { + } + + ~ReadFanControlFanModeSequence() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFanModeSequenceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanModeSequence response %@", [value description]); + if (error != nil) { + LogNSError("FanControl FanModeSequence read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteFanControlFanModeSequence : public WriteAttribute { +public: + WriteFanControlFanModeSequence() + : WriteAttribute("fan-mode-sequence") + { + AddArgument("attr-name", "fan-mode-sequence"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteFanControlFanModeSequence() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeFanModeSequenceWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl FanModeSequence write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { +public: + SubscribeAttributeFanControlFanModeSequence() + : SubscribeAttribute("fan-mode-sequence") + { + } + + ~SubscribeAttributeFanControlFanModeSequence() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFanModeSequenceWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FanModeSequence response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute PercentSetting + */ +class ReadFanControlPercentSetting : public ReadAttribute { +public: + ReadFanControlPercentSetting() + : ReadAttribute("percent-setting") + { + } + + ~ReadFanControlPercentSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentSetting response %@", [value description]); + if (error != nil) { + LogNSError("FanControl PercentSetting read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteFanControlPercentSetting : public WriteAttribute { +public: + WriteFanControlPercentSetting() + : WriteAttribute("percent-setting") + { + AddArgument("attr-name", "percent-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteFanControlPercentSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePercentSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl PercentSetting write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { +public: + SubscribeAttributeFanControlPercentSetting() + : SubscribeAttribute("percent-setting") + { + } + + ~SubscribeAttributeFanControlPercentSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributePercentSettingWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentSetting response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute PercentCurrent + */ +class ReadFanControlPercentCurrent : public ReadAttribute { +public: + ReadFanControlPercentCurrent() + : ReadAttribute("percent-current") + { + } + + ~ReadFanControlPercentCurrent() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000003) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentCurrent response %@", [value description]); + if (error != nil) { + LogNSError("FanControl PercentCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { +public: + SubscribeAttributeFanControlPercentCurrent() + : SubscribeAttribute("percent-current") + { + } + + ~SubscribeAttributeFanControlPercentCurrent() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributePercentCurrentWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.PercentCurrent response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SpeedMax + */ +class ReadFanControlSpeedMax : public ReadAttribute { +public: + ReadFanControlSpeedMax() + : ReadAttribute("speed-max") + { + } + + ~ReadFanControlSpeedMax() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000004) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedMax response %@", [value description]); + if (error != nil) { + LogNSError("FanControl SpeedMax read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { +public: + SubscribeAttributeFanControlSpeedMax() + : SubscribeAttribute("speed-max") + { + } + + ~SubscribeAttributeFanControlSpeedMax() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSpeedMaxWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedMax response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SpeedSetting + */ +class ReadFanControlSpeedSetting : public ReadAttribute { +public: + ReadFanControlSpeedSetting() + : ReadAttribute("speed-setting") + { + } + + ~ReadFanControlSpeedSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000005) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedSetting response %@", [value description]); + if (error != nil) { + LogNSError("FanControl SpeedSetting read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteFanControlSpeedSetting : public WriteAttribute { +public: + WriteFanControlSpeedSetting() + : WriteAttribute("speed-setting") + { + AddArgument("attr-name", "speed-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteFanControlSpeedSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeSpeedSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl SpeedSetting write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { +public: + SubscribeAttributeFanControlSpeedSetting() + : SubscribeAttribute("speed-setting") + { + } + + ~SubscribeAttributeFanControlSpeedSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000005) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSpeedSettingWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedSetting response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SpeedCurrent + */ +class ReadFanControlSpeedCurrent : public ReadAttribute { +public: + ReadFanControlSpeedCurrent() + : ReadAttribute("speed-current") + { + } + + ~ReadFanControlSpeedCurrent() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000006) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + if (error != nil) { + LogNSError("FanControl SpeedCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { +public: + SubscribeAttributeFanControlSpeedCurrent() + : SubscribeAttribute("speed-current") + { + } + + ~SubscribeAttributeFanControlSpeedCurrent() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000006) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeSpeedCurrentWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute RockSupport + */ +class ReadFanControlRockSupport : public ReadAttribute { +public: + ReadFanControlRockSupport() + : ReadAttribute("rock-support") + { + } + + ~ReadFanControlRockSupport() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000007) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSupport response %@", [value description]); + if (error != nil) { + LogNSError("FanControl RockSupport read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { +public: + SubscribeAttributeFanControlRockSupport() + : SubscribeAttribute("rock-support") + { + } + + ~SubscribeAttributeFanControlRockSupport() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000007) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeRockSupportWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSupport response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute RockSetting + */ +class ReadFanControlRockSetting : public ReadAttribute { +public: + ReadFanControlRockSetting() + : ReadAttribute("rock-setting") + { + } + + ~ReadFanControlRockSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000008) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSetting response %@", [value description]); + if (error != nil) { + LogNSError("FanControl RockSetting read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteFanControlRockSetting : public WriteAttribute { +public: + WriteFanControlRockSetting() + : WriteAttribute("rock-setting") + { + AddArgument("attr-name", "rock-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteFanControlRockSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000008) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeRockSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl RockSetting write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { +public: + SubscribeAttributeFanControlRockSetting() + : SubscribeAttribute("rock-setting") + { + } + + ~SubscribeAttributeFanControlRockSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000008) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeRockSettingWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.RockSetting response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute WindSupport + */ +class ReadFanControlWindSupport : public ReadAttribute { +public: + ReadFanControlWindSupport() + : ReadAttribute("wind-support") + { + } + + ~ReadFanControlWindSupport() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000009) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSupport response %@", [value description]); + if (error != nil) { + LogNSError("FanControl WindSupport read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { +public: + SubscribeAttributeFanControlWindSupport() + : SubscribeAttribute("wind-support") + { + } + + ~SubscribeAttributeFanControlWindSupport() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000009) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeWindSupportWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSupport response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute WindSetting + */ +class ReadFanControlWindSetting : public ReadAttribute { +public: + ReadFanControlWindSetting() + : ReadAttribute("wind-setting") + { + } + + ~ReadFanControlWindSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSetting response %@", [value description]); + if (error != nil) { + LogNSError("FanControl WindSetting read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteFanControlWindSetting : public WriteAttribute { +public: + WriteFanControlWindSetting() + : WriteAttribute("wind-setting") + { + AddArgument("attr-name", "wind-setting"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteFanControlWindSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeWindSettingWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("FanControl WindSetting write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { +public: + SubscribeAttributeFanControlWindSetting() + : SubscribeAttribute("wind-setting") + { + } + + ~SubscribeAttributeFanControlWindSetting() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeWindSettingWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.WindSetting response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadFanControlGeneratedCommandList : public ReadAttribute { +public: + ReadFanControlGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadFanControlGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("FanControl GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeFanControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeFanControlGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadFanControlAcceptedCommandList : public ReadAttribute { +public: + ReadFanControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadFanControlAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("FanControl AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeFanControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeFanControlAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadFanControlEventList : public ReadAttribute { +public: + ReadFanControlEventList() + : ReadAttribute("event-list") + { + } + + ~ReadFanControlEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.EventList response %@", [value description]); + if (error != nil) { + LogNSError("FanControl EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlEventList : public SubscribeAttribute { +public: + SubscribeAttributeFanControlEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeFanControlEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadFanControlAttributeList : public ReadAttribute { +public: + ReadFanControlAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadFanControlAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("FanControl AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeFanControlAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeFanControlAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadFanControlFeatureMap : public ReadAttribute { +public: + ReadFanControlFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadFanControlFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("FanControl FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeFanControlFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeFanControlFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadFanControlClusterRevision : public ReadAttribute { +public: + ReadFanControlClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadFanControlClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("FanControl ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeFanControlClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeFanControlClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FanControl.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/*----------------------------------------------------------------------------*\ +| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureDisplayMode | 0x0000 | +| * KeypadLockout | 0x0001 | +| * ScheduleProgrammingVisibility | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute TemperatureDisplayMode + */ +class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : ReadAttribute("temperature-display-mode") + { + } + + ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { +public: + WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : WriteAttribute("temperature-display-mode") + { + AddArgument("attr-name", "temperature-display-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeTemperatureDisplayModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration " + "TemperatureDisplayMode write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() + : SubscribeAttribute("temperature-display-mode") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000000) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeTemperatureDisplayModeWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute KeypadLockout + */ +class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationKeypadLockout() + : ReadAttribute("keypad-lockout") + { + } + + ~ReadThermostatUserInterfaceConfigurationKeypadLockout() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { +public: + WriteThermostatUserInterfaceConfigurationKeypadLockout() + : WriteAttribute("keypad-lockout") + { + AddArgument("attr-name", "keypad-lockout"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatUserInterfaceConfigurationKeypadLockout() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeKeypadLockoutWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() + : SubscribeAttribute("keypad-lockout") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeKeypadLockoutWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ScheduleProgrammingVisibility + */ +class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : ReadAttribute("schedule-programming-visibility") + { + } + + ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { +public: + WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : WriteAttribute("schedule-programming-visibility") + { + AddArgument("attr-name", "schedule-programming-visibility"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration " + "ScheduleProgrammingVisibility write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() + : SubscribeAttribute("schedule-programming-visibility") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadThermostatUserInterfaceConfigurationEventList : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadThermostatUserInterfaceConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationEventList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadThermostatUserInterfaceConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadThermostatUserInterfaceConfigurationFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { +public: + ReadThermostatUserInterfaceConfigurationClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadThermostatUserInterfaceConfigurationClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/*----------------------------------------------------------------------------*\ +| Cluster ColorControl | 0x0300 | +|------------------------------------------------------------------------------| +| Commands: | | +| * MoveToHue | 0x00 | +| * MoveHue | 0x01 | +| * StepHue | 0x02 | +| * MoveToSaturation | 0x03 | +| * MoveSaturation | 0x04 | +| * StepSaturation | 0x05 | +| * MoveToHueAndSaturation | 0x06 | +| * MoveToColor | 0x07 | +| * MoveColor | 0x08 | +| * StepColor | 0x09 | +| * MoveToColorTemperature | 0x0A | +| * EnhancedMoveToHue | 0x40 | +| * EnhancedMoveHue | 0x41 | +| * EnhancedStepHue | 0x42 | +| * EnhancedMoveToHueAndSaturation | 0x43 | +| * ColorLoopSet | 0x44 | +| * StopMoveStep | 0x47 | +| * MoveColorTemperature | 0x4B | +| * StepColorTemperature | 0x4C | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentHue | 0x0000 | +| * CurrentSaturation | 0x0001 | +| * RemainingTime | 0x0002 | +| * CurrentX | 0x0003 | +| * CurrentY | 0x0004 | +| * DriftCompensation | 0x0005 | +| * CompensationText | 0x0006 | +| * ColorTemperatureMireds | 0x0007 | +| * ColorMode | 0x0008 | +| * Options | 0x000F | +| * NumberOfPrimaries | 0x0010 | +| * Primary1X | 0x0011 | +| * Primary1Y | 0x0012 | +| * Primary1Intensity | 0x0013 | +| * Primary2X | 0x0015 | +| * Primary2Y | 0x0016 | +| * Primary2Intensity | 0x0017 | +| * Primary3X | 0x0019 | +| * Primary3Y | 0x001A | +| * Primary3Intensity | 0x001B | +| * Primary4X | 0x0020 | +| * Primary4Y | 0x0021 | +| * Primary4Intensity | 0x0022 | +| * Primary5X | 0x0024 | +| * Primary5Y | 0x0025 | +| * Primary5Intensity | 0x0026 | +| * Primary6X | 0x0028 | +| * Primary6Y | 0x0029 | +| * Primary6Intensity | 0x002A | +| * WhitePointX | 0x0030 | +| * WhitePointY | 0x0031 | +| * ColorPointRX | 0x0032 | +| * ColorPointRY | 0x0033 | +| * ColorPointRIntensity | 0x0034 | +| * ColorPointGX | 0x0036 | +| * ColorPointGY | 0x0037 | +| * ColorPointGIntensity | 0x0038 | +| * ColorPointBX | 0x003A | +| * ColorPointBY | 0x003B | +| * ColorPointBIntensity | 0x003C | +| * EnhancedCurrentHue | 0x4000 | +| * EnhancedColorMode | 0x4001 | +| * ColorLoopActive | 0x4002 | +| * ColorLoopDirection | 0x4003 | +| * ColorLoopTime | 0x4004 | +| * ColorLoopStartEnhancedHue | 0x4005 | +| * ColorLoopStoredEnhancedHue | 0x4006 | +| * ColorCapabilities | 0x400A | +| * ColorTempPhysicalMinMireds | 0x400B | +| * ColorTempPhysicalMaxMireds | 0x400C | +| * CoupleColorTempToLevelMinMireds | 0x400D | +| * StartUpColorTemperatureMireds | 0x4010 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command MoveToHue + */ +class ColorControlMoveToHue : public ClusterCommand { +public: + ColorControlMoveToHue() + : ClusterCommand("move-to-hue") + { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToHueWithParams:params + completion:^(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::ColorControl::Commands::MoveToHue::Type mRequest; +}; + +/* + * Command MoveHue + */ +class ColorControlMoveHue : public ClusterCommand { +public: + ColorControlMoveHue() + : ClusterCommand("move-hue") + { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveHueWithParams:params + completion:^(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::ColorControl::Commands::MoveHue::Type mRequest; +}; + +/* + * Command StepHue + */ +class ColorControlStepHue : public ClusterCommand { +public: + ColorControlStepHue() + : ClusterCommand("step-hue") + { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepHueWithParams:params + completion:^(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::ColorControl::Commands::StepHue::Type mRequest; +}; + +/* + * Command MoveToSaturation + */ +class ColorControlMoveToSaturation : public ClusterCommand { +public: + ColorControlMoveToSaturation() + : ClusterCommand("move-to-saturation") + { + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToSaturationWithParams:params + completion:^(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::ColorControl::Commands::MoveToSaturation::Type mRequest; +}; + +/* + * Command MoveSaturation + */ +class ColorControlMoveSaturation : public ClusterCommand { +public: + ColorControlMoveSaturation() + : ClusterCommand("move-saturation") + { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveSaturationWithParams:params + completion:^(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::ColorControl::Commands::MoveSaturation::Type mRequest; +}; + +/* + * Command StepSaturation + */ +class ColorControlStepSaturation : public ClusterCommand { +public: + ColorControlStepSaturation() + : ClusterCommand("step-saturation") + { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepSaturationWithParams:params + completion:^(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::ColorControl::Commands::StepSaturation::Type mRequest; +}; + +/* + * Command MoveToHueAndSaturation + */ +class ColorControlMoveToHueAndSaturation : public ClusterCommand { +public: + ColorControlMoveToHueAndSaturation() + : ClusterCommand("move-to-hue-and-saturation") + { + AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToHueAndSaturationWithParams:params + completion:^(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::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; +}; + +/* + * Command MoveToColor + */ +class ColorControlMoveToColor : public ClusterCommand { +public: + ColorControlMoveToColor() + : ClusterCommand("move-to-color") + { + AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); + AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; + params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorWithParams:params + completion:^(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::ColorControl::Commands::MoveToColor::Type mRequest; +}; + +/* + * Command MoveColor + */ +class ColorControlMoveColor : public ClusterCommand { +public: + ColorControlMoveColor() + : ClusterCommand("move-color") + { + AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); + AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.rateX = [NSNumber numberWithShort:mRequest.rateX]; + params.rateY = [NSNumber numberWithShort:mRequest.rateY]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorWithParams:params + completion:^(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::ColorControl::Commands::MoveColor::Type mRequest; +}; + +/* + * Command StepColor + */ +class ColorControlStepColor : public ClusterCommand { +public: + ColorControlStepColor() + : ClusterCommand("step-color") + { + AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); + AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepX = [NSNumber numberWithShort:mRequest.stepX]; + params.stepY = [NSNumber numberWithShort:mRequest.stepY]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorWithParams:params + completion:^(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::ColorControl::Commands::StepColor::Type mRequest; +}; + +/* + * Command MoveToColorTemperature + */ +class ColorControlMoveToColorTemperature : public ClusterCommand { +public: + ColorControlMoveToColorTemperature() + : ClusterCommand("move-to-color-temperature") + { + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToColorTemperatureWithParams:params + completion:^(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::ColorControl::Commands::MoveToColorTemperature::Type mRequest; +}; + +/* + * Command EnhancedMoveToHue + */ +class ColorControlEnhancedMoveToHue : public ClusterCommand { +public: + ColorControlEnhancedMoveToHue() + : ClusterCommand("enhanced-move-to-hue") + { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueWithParams:params + completion:^(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::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; +}; + +/* + * Command EnhancedMoveHue + */ +class ColorControlEnhancedMoveHue : public ClusterCommand { +public: + ColorControlEnhancedMoveHue() + : ClusterCommand("enhanced-move-hue") + { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveHueWithParams:params + completion:^(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::ColorControl::Commands::EnhancedMoveHue::Type mRequest; +}; + +/* + * Command EnhancedStepHue + */ +class ColorControlEnhancedStepHue : public ClusterCommand { +public: + ColorControlEnhancedStepHue() + : ClusterCommand("enhanced-step-hue") + { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedStepHueWithParams:params + completion:^(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::ColorControl::Commands::EnhancedStepHue::Type mRequest; +}; + +/* + * Command EnhancedMoveToHueAndSaturation + */ +class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { +public: + ColorControlEnhancedMoveToHueAndSaturation() + : ClusterCommand("enhanced-move-to-hue-and-saturation") + { + AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); + AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; + params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster enhancedMoveToHueAndSaturationWithParams:params + completion:^(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::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; +}; + +/* + * Command ColorLoopSet + */ +class ColorControlColorLoopSet : public ClusterCommand { +public: + ColorControlColorLoopSet() + : ClusterCommand("color-loop-set") + { + AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); + AddArgument("Action", 0, UINT8_MAX, &mRequest.action); + AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); + AddArgument("Time", 0, UINT16_MAX, &mRequest.time); + AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; + params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; + params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; + params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; + params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster colorLoopSetWithParams:params + completion:^(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::ColorControl::Commands::ColorLoopSet::Type mRequest; +}; + +/* + * Command StopMoveStep + */ +class ColorControlStopMoveStep : public ClusterCommand { +public: + ColorControlStopMoveStep() + : ClusterCommand("stop-move-step") + { + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopMoveStepWithParams:params + completion:^(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::ColorControl::Commands::StopMoveStep::Type mRequest; +}; + +/* + * Command MoveColorTemperature + */ +class ColorControlMoveColorTemperature : public ClusterCommand { +public: + ColorControlMoveColorTemperature() + : ClusterCommand("move-color-temperature") + { + AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); + AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; + params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveColorTemperatureWithParams:params + completion:^(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::ColorControl::Commands::MoveColorTemperature::Type mRequest; +}; + +/* + * Command StepColorTemperature + */ +class ColorControlStepColorTemperature : public ClusterCommand { +public: + ColorControlStepColorTemperature() + : ClusterCommand("step-color-temperature") + { + AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); + AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); + AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); + AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); + AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); + AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); + AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; + params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; + params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; + params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stepColorTemperatureWithParams:params + completion:^(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::ColorControl::Commands::StepColorTemperature::Type mRequest; +}; + +/* + * Attribute CurrentHue + */ +class ReadColorControlCurrentHue : public ReadAttribute { public: - WriteFanControlFanModeSequence() - : WriteAttribute("fan-mode-sequence") + ReadColorControlCurrentHue() + : ReadAttribute("current-hue") { - AddArgument("attr-name", "fan-mode-sequence"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteFanControlFanModeSequence() {} + ~ReadColorControlCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000000) on endpoint %u", endpointId); - [cluster writeAttributeFanModeSequenceWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl FanModeSequence write Error", error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentHue response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl CurrentHue read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeFanControlFanModeSequence() - : SubscribeAttribute("fan-mode-sequence") + SubscribeAttributeColorControlCurrentHue() + : SubscribeAttribute("current-hue") { } - ~SubscribeAttributeFanControlFanModeSequence() {} + ~SubscribeAttributeColorControlCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53606,12 +62746,12 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFanModeSequenceWithParams:params + [cluster subscribeAttributeCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FanModeSequence response %@", [value description]); + NSLog(@"ColorControl.CurrentHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53620,29 +62760,29 @@ class SubscribeAttributeFanControlFanModeSequence : public SubscribeAttribute { }; /* - * Attribute PercentSetting + * Attribute CurrentSaturation */ -class ReadFanControlPercentSetting : public ReadAttribute { +class ReadColorControlCurrentSaturation : public ReadAttribute { public: - ReadFanControlPercentSetting() - : ReadAttribute("percent-setting") + ReadColorControlCurrentSaturation() + : ReadAttribute("current-saturation") { } - ~ReadFanControlPercentSetting() {} + ~ReadColorControlCurrentSaturation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePercentSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); if (error != nil) { - LogNSError("FanControl PercentSetting read Error", error); + LogNSError("ColorControl CurrentSaturation read Error", error); } SetCommandExitStatus(error); }]; @@ -53650,62 +62790,22 @@ class ReadFanControlPercentSetting : public ReadAttribute { } }; -class WriteFanControlPercentSetting : public WriteAttribute { -public: - WriteFanControlPercentSetting() - : WriteAttribute("percent-setting") - { - AddArgument("attr-name", "percent-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlPercentSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePercentSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl PercentSetting write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { public: - SubscribeAttributeFanControlPercentSetting() - : SubscribeAttribute("percent-setting") + SubscribeAttributeColorControlCurrentSaturation() + : SubscribeAttribute("current-saturation") { } - ~SubscribeAttributeFanControlPercentSetting() {} + ~SubscribeAttributeColorControlCurrentSaturation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53716,12 +62816,12 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePercentSettingWithParams:params + [cluster subscribeAttributeCurrentSaturationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentSetting response %@", [value description]); + NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53730,29 +62830,29 @@ class SubscribeAttributeFanControlPercentSetting : public SubscribeAttribute { }; /* - * Attribute PercentCurrent + * Attribute RemainingTime */ -class ReadFanControlPercentCurrent : public ReadAttribute { +class ReadColorControlRemainingTime : public ReadAttribute { public: - ReadFanControlPercentCurrent() - : ReadAttribute("percent-current") + ReadColorControlRemainingTime() + : ReadAttribute("remaining-time") { } - ~ReadFanControlPercentCurrent() {} + ~ReadColorControlRemainingTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePercentCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.RemainingTime response %@", [value description]); if (error != nil) { - LogNSError("FanControl PercentCurrent read Error", error); + LogNSError("ColorControl RemainingTime read Error", error); } SetCommandExitStatus(error); }]; @@ -53760,22 +62860,22 @@ class ReadFanControlPercentCurrent : public ReadAttribute { } }; -class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { +class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { public: - SubscribeAttributeFanControlPercentCurrent() - : SubscribeAttribute("percent-current") + SubscribeAttributeColorControlRemainingTime() + : SubscribeAttribute("remaining-time") { } - ~SubscribeAttributeFanControlPercentCurrent() {} + ~SubscribeAttributeColorControlRemainingTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53786,12 +62886,12 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePercentCurrentWithParams:params + [cluster subscribeAttributeRemainingTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.PercentCurrent response %@", [value description]); + NSLog(@"ColorControl.RemainingTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53800,29 +62900,29 @@ class SubscribeAttributeFanControlPercentCurrent : public SubscribeAttribute { }; /* - * Attribute SpeedMax + * Attribute CurrentX */ -class ReadFanControlSpeedMax : public ReadAttribute { +class ReadColorControlCurrentX : public ReadAttribute { public: - ReadFanControlSpeedMax() - : ReadAttribute("speed-max") + ReadColorControlCurrentX() + : ReadAttribute("current-x") { } - ~ReadFanControlSpeedMax() {} + ~ReadColorControlCurrentX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentX response %@", [value description]); if (error != nil) { - LogNSError("FanControl SpeedMax read Error", error); + LogNSError("ColorControl CurrentX read Error", error); } SetCommandExitStatus(error); }]; @@ -53830,22 +62930,22 @@ class ReadFanControlSpeedMax : public ReadAttribute { } }; -class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { public: - SubscribeAttributeFanControlSpeedMax() - : SubscribeAttribute("speed-max") + SubscribeAttributeColorControlCurrentX() + : SubscribeAttribute("current-x") { } - ~SubscribeAttributeFanControlSpeedMax() {} + ~SubscribeAttributeColorControlCurrentX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53856,12 +62956,12 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedMaxWithParams:params + [cluster subscribeAttributeCurrentXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedMax response %@", [value description]); + NSLog(@"ColorControl.CurrentX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53870,29 +62970,29 @@ class SubscribeAttributeFanControlSpeedMax : public SubscribeAttribute { }; /* - * Attribute SpeedSetting + * Attribute CurrentY */ -class ReadFanControlSpeedSetting : public ReadAttribute { +class ReadColorControlCurrentY : public ReadAttribute { public: - ReadFanControlSpeedSetting() - : ReadAttribute("speed-setting") + ReadColorControlCurrentY() + : ReadAttribute("current-y") { } - ~ReadFanControlSpeedSetting() {} + ~ReadColorControlCurrentY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CurrentY response %@", [value description]); if (error != nil) { - LogNSError("FanControl SpeedSetting read Error", error); + LogNSError("ColorControl CurrentY read Error", error); } SetCommandExitStatus(error); }]; @@ -53900,62 +63000,22 @@ class ReadFanControlSpeedSetting : public ReadAttribute { } }; -class WriteFanControlSpeedSetting : public WriteAttribute { -public: - WriteFanControlSpeedSetting() - : WriteAttribute("speed-setting") - { - AddArgument("attr-name", "speed-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlSpeedSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000005) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeSpeedSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl SpeedSetting write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { +class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { public: - SubscribeAttributeFanControlSpeedSetting() - : SubscribeAttribute("speed-setting") + SubscribeAttributeColorControlCurrentY() + : SubscribeAttribute("current-y") { } - ~SubscribeAttributeFanControlSpeedSetting() {} + ~SubscribeAttributeColorControlCurrentY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -53966,12 +63026,12 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedSettingWithParams:params + [cluster subscribeAttributeCurrentYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedSetting response %@", [value description]); + NSLog(@"ColorControl.CurrentY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -53980,29 +63040,29 @@ class SubscribeAttributeFanControlSpeedSetting : public SubscribeAttribute { }; /* - * Attribute SpeedCurrent + * Attribute DriftCompensation */ -class ReadFanControlSpeedCurrent : public ReadAttribute { +class ReadColorControlDriftCompensation : public ReadAttribute { public: - ReadFanControlSpeedCurrent() - : ReadAttribute("speed-current") + ReadColorControlDriftCompensation() + : ReadAttribute("drift-compensation") { } - ~ReadFanControlSpeedCurrent() {} + ~ReadColorControlDriftCompensation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); if (error != nil) { - LogNSError("FanControl SpeedCurrent read Error", error); + LogNSError("ColorControl DriftCompensation read Error", error); } SetCommandExitStatus(error); }]; @@ -54010,22 +63070,22 @@ class ReadFanControlSpeedCurrent : public ReadAttribute { } }; -class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { +class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { public: - SubscribeAttributeFanControlSpeedCurrent() - : SubscribeAttribute("speed-current") + SubscribeAttributeColorControlDriftCompensation() + : SubscribeAttribute("drift-compensation") { } - ~SubscribeAttributeFanControlSpeedCurrent() {} + ~SubscribeAttributeColorControlDriftCompensation() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54036,12 +63096,12 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedCurrentWithParams:params + [cluster subscribeAttributeDriftCompensationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.SpeedCurrent response %@", [value description]); + NSLog(@"ColorControl.DriftCompensation response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54050,29 +63110,29 @@ class SubscribeAttributeFanControlSpeedCurrent : public SubscribeAttribute { }; /* - * Attribute RockSupport + * Attribute CompensationText */ -class ReadFanControlRockSupport : public ReadAttribute { +class ReadColorControlCompensationText : public ReadAttribute { public: - ReadFanControlRockSupport() - : ReadAttribute("rock-support") + ReadColorControlCompensationText() + : ReadAttribute("compensation-text") { } - ~ReadFanControlRockSupport() {} + ~ReadColorControlCompensationText() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRockSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); if (error != nil) { - LogNSError("FanControl RockSupport read Error", error); + LogNSError("ColorControl CompensationText read Error", error); } SetCommandExitStatus(error); }]; @@ -54080,22 +63140,22 @@ class ReadFanControlRockSupport : public ReadAttribute { } }; -class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { +class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { public: - SubscribeAttributeFanControlRockSupport() - : SubscribeAttribute("rock-support") + SubscribeAttributeColorControlCompensationText() + : SubscribeAttribute("compensation-text") { } - ~SubscribeAttributeFanControlRockSupport() {} + ~SubscribeAttributeColorControlCompensationText() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54106,12 +63166,12 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRockSupportWithParams:params + [cluster subscribeAttributeCompensationTextWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSupport response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CompensationText response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54120,29 +63180,29 @@ class SubscribeAttributeFanControlRockSupport : public SubscribeAttribute { }; /* - * Attribute RockSetting + * Attribute ColorTemperatureMireds */ -class ReadFanControlRockSetting : public ReadAttribute { +class ReadColorControlColorTemperatureMireds : public ReadAttribute { public: - ReadFanControlRockSetting() - : ReadAttribute("rock-setting") + ReadColorControlColorTemperatureMireds() + : ReadAttribute("color-temperature-mireds") { } - ~ReadFanControlRockSetting() {} + ~ReadColorControlColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRockSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); if (error != nil) { - LogNSError("FanControl RockSetting read Error", error); + LogNSError("ColorControl ColorTemperatureMireds read Error", error); } SetCommandExitStatus(error); }]; @@ -54150,62 +63210,22 @@ class ReadFanControlRockSetting : public ReadAttribute { } }; -class WriteFanControlRockSetting : public WriteAttribute { -public: - WriteFanControlRockSetting() - : WriteAttribute("rock-setting") - { - AddArgument("attr-name", "rock-setting"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteFanControlRockSetting() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x00000008) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeRockSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl RockSetting write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { public: - SubscribeAttributeFanControlRockSetting() - : SubscribeAttribute("rock-setting") + SubscribeAttributeColorControlColorTemperatureMireds() + : SubscribeAttribute("color-temperature-mireds") { } - ~SubscribeAttributeFanControlRockSetting() {} + ~SubscribeAttributeColorControlColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54216,12 +63236,12 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRockSettingWithParams:params + [cluster subscribeAttributeColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.RockSetting response %@", [value description]); + NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54230,29 +63250,29 @@ class SubscribeAttributeFanControlRockSetting : public SubscribeAttribute { }; /* - * Attribute WindSupport + * Attribute ColorMode */ -class ReadFanControlWindSupport : public ReadAttribute { -public: - ReadFanControlWindSupport() - : ReadAttribute("wind-support") +class ReadColorControlColorMode : public ReadAttribute { +public: + ReadColorControlColorMode() + : ReadAttribute("color-mode") { } - ~ReadFanControlWindSupport() {} + ~ReadColorControlColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWindSupportWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorMode response %@", [value description]); if (error != nil) { - LogNSError("FanControl WindSupport read Error", error); + LogNSError("ColorControl ColorMode read Error", error); } SetCommandExitStatus(error); }]; @@ -54260,22 +63280,22 @@ class ReadFanControlWindSupport : public ReadAttribute { } }; -class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { +class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { public: - SubscribeAttributeFanControlWindSupport() - : SubscribeAttribute("wind-support") + SubscribeAttributeColorControlColorMode() + : SubscribeAttribute("color-mode") { } - ~SubscribeAttributeFanControlWindSupport() {} + ~SubscribeAttributeColorControlColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x00000009) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000008) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54286,12 +63306,12 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWindSupportWithParams:params + [cluster subscribeAttributeColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSupport response %@", [value description]); + NSLog(@"ColorControl.ColorMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54300,29 +63320,29 @@ class SubscribeAttributeFanControlWindSupport : public SubscribeAttribute { }; /* - * Attribute WindSetting + * Attribute Options */ -class ReadFanControlWindSetting : public ReadAttribute { +class ReadColorControlOptions : public ReadAttribute { public: - ReadFanControlWindSetting() - : ReadAttribute("wind-setting") + ReadColorControlOptions() + : ReadAttribute("options") { } - ~ReadFanControlWindSetting() {} + ~ReadColorControlOptions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWindSettingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Options response %@", [value description]); if (error != nil) { - LogNSError("FanControl WindSetting read Error", error); + LogNSError("ColorControl Options read Error", error); } SetCommandExitStatus(error); }]; @@ -54330,39 +63350,39 @@ class ReadFanControlWindSetting : public ReadAttribute { } }; -class WriteFanControlWindSetting : public WriteAttribute { +class WriteColorControlOptions : public WriteAttribute { public: - WriteFanControlWindSetting() - : WriteAttribute("wind-setting") + WriteColorControlOptions() + : WriteAttribute("options") { - AddArgument("attr-name", "wind-setting"); + AddArgument("attr-name", "options"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteFanControlWindSetting() {} + ~WriteColorControlOptions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) WriteAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeWindSettingWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("FanControl WindSetting write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeOptionsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl Options write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -54370,22 +63390,22 @@ class WriteFanControlWindSetting : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { +class SubscribeAttributeColorControlOptions : public SubscribeAttribute { public: - SubscribeAttributeFanControlWindSetting() - : SubscribeAttribute("wind-setting") + SubscribeAttributeColorControlOptions() + : SubscribeAttribute("options") { } - ~SubscribeAttributeFanControlWindSetting() {} + ~SubscribeAttributeColorControlOptions() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000000F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54396,12 +63416,12 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWindSettingWithParams:params + [cluster subscribeAttributeOptionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.WindSetting response %@", [value description]); + NSLog(@"ColorControl.Options response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54410,29 +63430,29 @@ class SubscribeAttributeFanControlWindSetting : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute NumberOfPrimaries */ -class ReadFanControlGeneratedCommandList : public ReadAttribute { +class ReadColorControlNumberOfPrimaries : public ReadAttribute { public: - ReadFanControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlNumberOfPrimaries() + : ReadAttribute("number-of-primaries") { } - ~ReadFanControlGeneratedCommandList() {} + ~ReadColorControlNumberOfPrimaries() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); if (error != nil) { - LogNSError("FanControl GeneratedCommandList read Error", error); + LogNSError("ColorControl NumberOfPrimaries read Error", error); } SetCommandExitStatus(error); }]; @@ -54440,22 +63460,22 @@ class ReadFanControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { public: - SubscribeAttributeFanControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlNumberOfPrimaries() + : SubscribeAttribute("number-of-primaries") { } - ~SubscribeAttributeFanControlGeneratedCommandList() {} + ~SubscribeAttributeColorControlNumberOfPrimaries() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54466,12 +63486,12 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeNumberOfPrimariesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54480,29 +63500,29 @@ class SubscribeAttributeFanControlGeneratedCommandList : public SubscribeAttribu }; /* - * Attribute AcceptedCommandList + * Attribute Primary1X */ -class ReadFanControlAcceptedCommandList : public ReadAttribute { +class ReadColorControlPrimary1X : public ReadAttribute { public: - ReadFanControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlPrimary1X() + : ReadAttribute("primary1x") { } - ~ReadFanControlAcceptedCommandList() {} + ~ReadColorControlPrimary1X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1X response %@", [value description]); if (error != nil) { - LogNSError("FanControl AcceptedCommandList read Error", error); + LogNSError("ColorControl Primary1X read Error", error); } SetCommandExitStatus(error); }]; @@ -54510,22 +63530,22 @@ class ReadFanControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { public: - SubscribeAttributeFanControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlPrimary1X() + : SubscribeAttribute("primary1x") { } - ~SubscribeAttributeFanControlAcceptedCommandList() {} + ~SubscribeAttributeColorControlPrimary1X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54536,12 +63556,12 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePrimary1XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54550,29 +63570,29 @@ class SubscribeAttributeFanControlAcceptedCommandList : public SubscribeAttribut }; /* - * Attribute AttributeList + * Attribute Primary1Y */ -class ReadFanControlAttributeList : public ReadAttribute { +class ReadColorControlPrimary1Y : public ReadAttribute { public: - ReadFanControlAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlPrimary1Y() + : ReadAttribute("primary1y") { } - ~ReadFanControlAttributeList() {} + ~ReadColorControlPrimary1Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Y response %@", [value description]); if (error != nil) { - LogNSError("FanControl AttributeList read Error", error); + LogNSError("ColorControl Primary1Y read Error", error); } SetCommandExitStatus(error); }]; @@ -54580,22 +63600,22 @@ class ReadFanControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { public: - SubscribeAttributeFanControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlPrimary1Y() + : SubscribeAttribute("primary1y") { } - ~SubscribeAttributeFanControlAttributeList() {} + ~SubscribeAttributeColorControlPrimary1Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54606,12 +63626,12 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePrimary1YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54620,29 +63640,29 @@ class SubscribeAttributeFanControlAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute Primary1Intensity */ -class ReadFanControlFeatureMap : public ReadAttribute { +class ReadColorControlPrimary1Intensity : public ReadAttribute { public: - ReadFanControlFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlPrimary1Intensity() + : ReadAttribute("primary1intensity") { } - ~ReadFanControlFeatureMap() {} + ~ReadColorControlPrimary1Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); if (error != nil) { - LogNSError("FanControl FeatureMap read Error", error); + LogNSError("ColorControl Primary1Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -54650,22 +63670,22 @@ class ReadFanControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { public: - SubscribeAttributeFanControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlPrimary1Intensity() + : SubscribeAttribute("primary1intensity") { } - ~SubscribeAttributeFanControlFeatureMap() {} + ~SubscribeAttributeColorControlPrimary1Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54676,12 +63696,12 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePrimary1IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54690,29 +63710,29 @@ class SubscribeAttributeFanControlFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute Primary2X */ -class ReadFanControlClusterRevision : public ReadAttribute { +class ReadColorControlPrimary2X : public ReadAttribute { public: - ReadFanControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlPrimary2X() + : ReadAttribute("primary2x") { } - ~ReadFanControlClusterRevision() {} + ~ReadColorControlPrimary2X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2X response %@", [value description]); if (error != nil) { - LogNSError("FanControl ClusterRevision read Error", error); + LogNSError("ColorControl Primary2X read Error", error); } SetCommandExitStatus(error); }]; @@ -54720,22 +63740,22 @@ class ReadFanControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { public: - SubscribeAttributeFanControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlPrimary2X() + : SubscribeAttribute("primary2x") { } - ~SubscribeAttributeFanControlClusterRevision() {} + ~SubscribeAttributeColorControlPrimary2X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000202) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFanControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54746,12 +63766,12 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePrimary2XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FanControl.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.Primary2X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54759,49 +63779,30 @@ class SubscribeAttributeFanControlClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster ThermostatUserInterfaceConfiguration | 0x0204 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureDisplayMode | 0x0000 | -| * KeypadLockout | 0x0001 | -| * ScheduleProgrammingVisibility | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute TemperatureDisplayMode + * Attribute Primary2Y */ -class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public ReadAttribute { +class ReadColorControlPrimary2Y : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : ReadAttribute("temperature-display-mode") + ReadColorControlPrimary2Y() + : ReadAttribute("primary2y") { } - ~ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} + ~ReadColorControlPrimary2Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTemperatureDisplayModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Y response %@", [value description]); if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration TemperatureDisplayMode read Error", error); + LogNSError("ColorControl Primary2Y read Error", error); } SetCommandExitStatus(error); }]; @@ -54809,64 +63810,22 @@ class ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode : public Re } }; -class WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : WriteAttribute("temperature-display-mode") - { - AddArgument("attr-name", "temperature-display-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeTemperatureDisplayModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration " - "TemperatureDisplayMode write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() - : SubscribeAttribute("temperature-display-mode") + SubscribeAttributeColorControlPrimary2Y() + : SubscribeAttribute("primary2y") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMode() {} + ~SubscribeAttributeColorControlPrimary2Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000016) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54877,12 +63836,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureDisplayModeWithParams:params + [cluster subscribeAttributePrimary2YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.TemperatureDisplayMode response %@", [value description]); + NSLog(@"ColorControl.Primary2Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -54891,93 +63850,52 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationTemperatureDisplayMo }; /* - * Attribute KeypadLockout + * Attribute Primary2Intensity */ -class ReadThermostatUserInterfaceConfigurationKeypadLockout : public ReadAttribute { +class ReadColorControlPrimary2Intensity : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationKeypadLockout() - : ReadAttribute("keypad-lockout") + ReadColorControlPrimary2Intensity() + : ReadAttribute("primary2intensity") { } - ~ReadThermostatUserInterfaceConfigurationKeypadLockout() {} + ~ReadColorControlPrimary2Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeKeypadLockoutWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUserInterfaceConfigurationKeypadLockout : public WriteAttribute { -public: - WriteThermostatUserInterfaceConfigurationKeypadLockout() - : WriteAttribute("keypad-lockout") - { - AddArgument("attr-name", "keypad-lockout"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUserInterfaceConfigurationKeypadLockout() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000017) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster - writeAttributeKeypadLockoutWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration KeypadLockout write Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl Primary2Intensity read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() - : SubscribeAttribute("keypad-lockout") + SubscribeAttributeColorControlPrimary2Intensity() + : SubscribeAttribute("primary2intensity") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout() {} + ~SubscribeAttributeColorControlPrimary2Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000017) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -54988,12 +63906,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeKeypadLockoutWithParams:params + [cluster subscribeAttributePrimary2IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.KeypadLockout response %@", [value description]); + NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -55002,29 +63920,29 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationKeypadLockout : publ }; /* - * Attribute ScheduleProgrammingVisibility + * Attribute Primary3X */ -class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public ReadAttribute { +class ReadColorControlPrimary3X : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : ReadAttribute("schedule-programming-visibility") + ReadColorControlPrimary3X() + : ReadAttribute("primary3x") { } - ~ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} + ~ReadColorControlPrimary3X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScheduleProgrammingVisibilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3X response %@", [value description]); if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration ScheduleProgrammingVisibility read Error", error); + LogNSError("ColorControl Primary3X read Error", error); } SetCommandExitStatus(error); }]; @@ -55032,64 +63950,92 @@ class ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : pu } }; -class WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public WriteAttribute { +class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { public: - WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : WriteAttribute("schedule-programming-visibility") + SubscribeAttributeColorControlPrimary3X() + : SubscribeAttribute("primary3x") { - AddArgument("attr-name", "schedule-programming-visibility"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} + ~SubscribeAttributeColorControlPrimary3X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) WriteAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000019) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributePrimary3XWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3X response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster writeAttributeScheduleProgrammingVisibilityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration " - "ScheduleProgrammingVisibility write Error", - error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; -private: - uint8_t mValue; +/* + * Attribute Primary3Y + */ +class ReadColorControlPrimary3Y : public ReadAttribute { +public: + ReadColorControlPrimary3Y() + : ReadAttribute("primary3y") + { + } + + ~ReadColorControlPrimary3Y() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Y response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl Primary3Y read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() - : SubscribeAttribute("schedule-programming-visibility") + SubscribeAttributeColorControlPrimary3Y() + : SubscribeAttribute("primary3y") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingVisibility() {} + ~SubscribeAttributeColorControlPrimary3Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55100,12 +64046,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScheduleProgrammingVisibilityWithParams:params + [cluster subscribeAttributePrimary3YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ScheduleProgrammingVisibility response %@", [value description]); + NSLog(@"ColorControl.Primary3Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -55114,29 +64060,29 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationScheduleProgrammingV }; /* - * Attribute GeneratedCommandList + * Attribute Primary3Intensity */ -class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public ReadAttribute { +class ReadColorControlPrimary3Intensity : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadColorControlPrimary3Intensity() + : ReadAttribute("primary3intensity") { } - ~ReadThermostatUserInterfaceConfigurationGeneratedCommandList() {} + ~ReadColorControlPrimary3Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration GeneratedCommandList read Error", error); + LogNSError("ColorControl Primary3Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -55144,22 +64090,22 @@ class ReadThermostatUserInterfaceConfigurationGeneratedCommandList : public Read } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeColorControlPrimary3Intensity() + : SubscribeAttribute("primary3intensity") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList() {} + ~SubscribeAttributeColorControlPrimary3Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55170,12 +64116,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePrimary3IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -55184,29 +64130,29 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationGeneratedCommandList }; /* - * Attribute AcceptedCommandList + * Attribute Primary4X */ -class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadAttribute { +class ReadColorControlPrimary4X : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadColorControlPrimary4X() + : ReadAttribute("primary4x") { } - ~ReadThermostatUserInterfaceConfigurationAcceptedCommandList() {} + ~ReadColorControlPrimary4X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4X response %@", [value description]); if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration AcceptedCommandList read Error", error); + LogNSError("ColorControl Primary4X read Error", error); } SetCommandExitStatus(error); }]; @@ -55214,22 +64160,22 @@ class ReadThermostatUserInterfaceConfigurationAcceptedCommandList : public ReadA } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeColorControlPrimary4X() + : SubscribeAttribute("primary4x") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList() {} + ~SubscribeAttributeColorControlPrimary4X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55240,12 +64186,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePrimary4XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -55254,29 +64200,29 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAcceptedCommandList }; /* - * Attribute AttributeList + * Attribute Primary4Y */ -class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribute { +class ReadColorControlPrimary4Y : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadColorControlPrimary4Y() + : ReadAttribute("primary4y") { } - ~ReadThermostatUserInterfaceConfigurationAttributeList() {} + ~ReadColorControlPrimary4Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Y response %@", [value description]); if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration AttributeList read Error", error); + LogNSError("ColorControl Primary4Y read Error", error); } SetCommandExitStatus(error); }]; @@ -55284,22 +64230,22 @@ class ReadThermostatUserInterfaceConfigurationAttributeList : public ReadAttribu } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeColorControlPrimary4Y() + : SubscribeAttribute("primary4y") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList() {} + ~SubscribeAttributeColorControlPrimary4Y() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55310,12 +64256,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePrimary4YWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Y response %@", [value description]); SetCommandExitStatus(error); }]; @@ -55324,29 +64270,29 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationAttributeList : publ }; /* - * Attribute FeatureMap + * Attribute Primary4Intensity */ -class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute { +class ReadColorControlPrimary4Intensity : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationFeatureMap() - : ReadAttribute("feature-map") + ReadColorControlPrimary4Intensity() + : ReadAttribute("primary4intensity") { } - ~ReadThermostatUserInterfaceConfigurationFeatureMap() {} + ~ReadColorControlPrimary4Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration FeatureMap read Error", error); + LogNSError("ColorControl Primary4Intensity read Error", error); } SetCommandExitStatus(error); }]; @@ -55354,22 +64300,22 @@ class ReadThermostatUserInterfaceConfigurationFeatureMap : public ReadAttribute } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeColorControlPrimary4Intensity() + : SubscribeAttribute("primary4intensity") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap() {} + ~SubscribeAttributeColorControlPrimary4Intensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55380,12 +64326,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePrimary4IntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.FeatureMap response %@", [value description]); + NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -55394,29 +64340,29 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationFeatureMap : public }; /* - * Attribute ClusterRevision + * Attribute Primary5X */ -class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttribute { +class ReadColorControlPrimary5X : public ReadAttribute { public: - ReadThermostatUserInterfaceConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ReadColorControlPrimary5X() + : ReadAttribute("primary5x") { } - ~ReadThermostatUserInterfaceConfigurationClusterRevision() {} + ~ReadColorControlPrimary5X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5X response %@", [value description]); if (error != nil) { - LogNSError("ThermostatUserInterfaceConfiguration ClusterRevision read Error", error); + LogNSError("ColorControl Primary5X read Error", error); } SetCommandExitStatus(error); }]; @@ -55424,22 +64370,22 @@ class ReadThermostatUserInterfaceConfigurationClusterRevision : public ReadAttri } }; -class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { public: - SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeColorControlPrimary5X() + : SubscribeAttribute("primary5x") { } - ~SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision() {} + ~SubscribeAttributeColorControlPrimary5X() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000204) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000024) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostatUserInterfaceConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -55450,12 +64396,12 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePrimary5XWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThermostatUserInterfaceConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"ColorControl.Primary5X response %@", [value description]); SetCommandExitStatus(error); }]; @@ -55463,1135 +64409,710 @@ class SubscribeAttributeThermostatUserInterfaceConfigurationClusterRevision : pu } }; -/*----------------------------------------------------------------------------*\ -| Cluster ColorControl | 0x0300 | -|------------------------------------------------------------------------------| -| Commands: | | -| * MoveToHue | 0x00 | -| * MoveHue | 0x01 | -| * StepHue | 0x02 | -| * MoveToSaturation | 0x03 | -| * MoveSaturation | 0x04 | -| * StepSaturation | 0x05 | -| * MoveToHueAndSaturation | 0x06 | -| * MoveToColor | 0x07 | -| * MoveColor | 0x08 | -| * StepColor | 0x09 | -| * MoveToColorTemperature | 0x0A | -| * EnhancedMoveToHue | 0x40 | -| * EnhancedMoveHue | 0x41 | -| * EnhancedStepHue | 0x42 | -| * EnhancedMoveToHueAndSaturation | 0x43 | -| * ColorLoopSet | 0x44 | -| * StopMoveStep | 0x47 | -| * MoveColorTemperature | 0x4B | -| * StepColorTemperature | 0x4C | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CurrentHue | 0x0000 | -| * CurrentSaturation | 0x0001 | -| * RemainingTime | 0x0002 | -| * CurrentX | 0x0003 | -| * CurrentY | 0x0004 | -| * DriftCompensation | 0x0005 | -| * CompensationText | 0x0006 | -| * ColorTemperatureMireds | 0x0007 | -| * ColorMode | 0x0008 | -| * Options | 0x000F | -| * NumberOfPrimaries | 0x0010 | -| * Primary1X | 0x0011 | -| * Primary1Y | 0x0012 | -| * Primary1Intensity | 0x0013 | -| * Primary2X | 0x0015 | -| * Primary2Y | 0x0016 | -| * Primary2Intensity | 0x0017 | -| * Primary3X | 0x0019 | -| * Primary3Y | 0x001A | -| * Primary3Intensity | 0x001B | -| * Primary4X | 0x0020 | -| * Primary4Y | 0x0021 | -| * Primary4Intensity | 0x0022 | -| * Primary5X | 0x0024 | -| * Primary5Y | 0x0025 | -| * Primary5Intensity | 0x0026 | -| * Primary6X | 0x0028 | -| * Primary6Y | 0x0029 | -| * Primary6Intensity | 0x002A | -| * WhitePointX | 0x0030 | -| * WhitePointY | 0x0031 | -| * ColorPointRX | 0x0032 | -| * ColorPointRY | 0x0033 | -| * ColorPointRIntensity | 0x0034 | -| * ColorPointGX | 0x0036 | -| * ColorPointGY | 0x0037 | -| * ColorPointGIntensity | 0x0038 | -| * ColorPointBX | 0x003A | -| * ColorPointBY | 0x003B | -| * ColorPointBIntensity | 0x003C | -| * EnhancedCurrentHue | 0x4000 | -| * EnhancedColorMode | 0x4001 | -| * ColorLoopActive | 0x4002 | -| * ColorLoopDirection | 0x4003 | -| * ColorLoopTime | 0x4004 | -| * ColorLoopStartEnhancedHue | 0x4005 | -| * ColorLoopStoredEnhancedHue | 0x4006 | -| * ColorCapabilities | 0x400A | -| * ColorTempPhysicalMinMireds | 0x400B | -| * ColorTempPhysicalMaxMireds | 0x400C | -| * CoupleColorTempToLevelMinMireds | 0x400D | -| * StartUpColorTemperatureMireds | 0x4010 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command MoveToHue + * Attribute Primary5Y */ -class ColorControlMoveToHue : public ClusterCommand { +class ReadColorControlPrimary5Y : public ReadAttribute { public: - ColorControlMoveToHue() - : ClusterCommand("move-to-hue") + ReadColorControlPrimary5Y() + : ReadAttribute("primary5y") { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlPrimary5Y() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Y response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl Primary5Y read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type mRequest; }; -/* - * Command MoveHue - */ -class ColorControlMoveHue : public ClusterCommand { +class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { public: - ColorControlMoveHue() - : ClusterCommand("move-hue") + SubscribeAttributeColorControlPrimary5Y() + : SubscribeAttribute("primary5y") { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlPrimary5Y() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000025) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributePrimary5YWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Y response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveHue::Type mRequest; }; /* - * Command StepHue + * Attribute Primary5Intensity */ -class ColorControlStepHue : public ClusterCommand { +class ReadColorControlPrimary5Intensity : public ReadAttribute { public: - ColorControlStepHue() - : ClusterCommand("step-hue") + ReadColorControlPrimary5Intensity() + : ReadAttribute("primary5intensity") { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlPrimary5Intensity() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl Primary5Intensity read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::StepHue::Type mRequest; }; -/* - * Command MoveToSaturation - */ -class ColorControlMoveToSaturation : public ClusterCommand { +class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { public: - ColorControlMoveToSaturation() - : ClusterCommand("move-to-saturation") + SubscribeAttributeColorControlPrimary5Intensity() + : SubscribeAttribute("primary5intensity") { - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlPrimary5Intensity() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000026) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributePrimary5IntensityWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type mRequest; }; /* - * Command MoveSaturation + * Attribute Primary6X */ -class ColorControlMoveSaturation : public ClusterCommand { +class ReadColorControlPrimary6X : public ReadAttribute { public: - ColorControlMoveSaturation() - : ClusterCommand("move-saturation") + ReadColorControlPrimary6X() + : ReadAttribute("primary6x") { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT8_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlPrimary6X() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedChar:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6X response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl Primary6X read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type mRequest; }; -/* - * Command StepSaturation - */ -class ColorControlStepSaturation : public ClusterCommand { +class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { public: - ColorControlStepSaturation() - : ClusterCommand("step-saturation") + SubscribeAttributeColorControlPrimary6X() + : SubscribeAttribute("primary6x") { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT8_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT8_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlPrimary6X() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000028) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedChar:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedChar:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributePrimary6XWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6X response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::StepSaturation::Type mRequest; }; /* - * Command MoveToHueAndSaturation + * Attribute Primary6Y */ -class ColorControlMoveToHueAndSaturation : public ClusterCommand { +class ReadColorControlPrimary6Y : public ReadAttribute { public: - ColorControlMoveToHueAndSaturation() - : ClusterCommand("move-to-hue-and-saturation") + ReadColorControlPrimary6Y() + : ReadAttribute("primary6y") { - AddArgument("Hue", 0, UINT8_MAX, &mRequest.hue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlPrimary6Y() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.hue = [NSNumber numberWithUnsignedChar:mRequest.hue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Y response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl Primary6Y read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type mRequest; }; -/* - * Command MoveToColor - */ -class ColorControlMoveToColor : public ClusterCommand { +class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { public: - ColorControlMoveToColor() - : ClusterCommand("move-to-color") + SubscribeAttributeColorControlPrimary6Y() + : SubscribeAttribute("primary6y") { - AddArgument("ColorX", 0, UINT16_MAX, &mRequest.colorX); - AddArgument("ColorY", 0, UINT16_MAX, &mRequest.colorY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlPrimary6Y() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000029) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorX = [NSNumber numberWithUnsignedShort:mRequest.colorX]; - params.colorY = [NSNumber numberWithUnsignedShort:mRequest.colorY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributePrimary6YWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Y response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColor::Type mRequest; }; /* - * Command MoveColor + * Attribute Primary6Intensity */ -class ColorControlMoveColor : public ClusterCommand { +class ReadColorControlPrimary6Intensity : public ReadAttribute { public: - ColorControlMoveColor() - : ClusterCommand("move-color") + ReadColorControlPrimary6Intensity() + : ReadAttribute("primary6intensity") { - AddArgument("RateX", INT16_MIN, INT16_MAX, &mRequest.rateX); - AddArgument("RateY", INT16_MIN, INT16_MAX, &mRequest.rateY); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlPrimary6Intensity() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.rateX = [NSNumber numberWithShort:mRequest.rateX]; - params.rateY = [NSNumber numberWithShort:mRequest.rateY]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl Primary6Intensity read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveColor::Type mRequest; }; -/* - * Command StepColor - */ -class ColorControlStepColor : public ClusterCommand { +class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { public: - ColorControlStepColor() - : ClusterCommand("step-color") + SubscribeAttributeColorControlPrimary6Intensity() + : SubscribeAttribute("primary6intensity") { - AddArgument("StepX", INT16_MIN, INT16_MAX, &mRequest.stepX); - AddArgument("StepY", INT16_MIN, INT16_MAX, &mRequest.stepY); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlPrimary6Intensity() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000002A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepX = [NSNumber numberWithShort:mRequest.stepX]; - params.stepY = [NSNumber numberWithShort:mRequest.stepY]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributePrimary6IntensityWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::StepColor::Type mRequest; }; /* - * Command MoveToColorTemperature + * Attribute WhitePointX */ -class ColorControlMoveToColorTemperature : public ClusterCommand { +class ReadColorControlWhitePointX : public ReadAttribute { public: - ColorControlMoveToColorTemperature() - : ClusterCommand("move-to-color-temperature") + ReadColorControlWhitePointX() + : ReadAttribute("white-point-x") { - AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlWhitePointX() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointX response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl WhitePointX read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type mRequest; }; -/* - * Command EnhancedMoveToHue - */ -class ColorControlEnhancedMoveToHue : public ClusterCommand { +class WriteColorControlWhitePointX : public WriteAttribute { public: - ColorControlEnhancedMoveToHue() - : ClusterCommand("enhanced-move-to-hue") + WriteColorControlWhitePointX() + : WriteAttribute("white-point-x") { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); + AddArgument("attr-name", "white-point-x"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } + ~WriteColorControlWhitePointX() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueParams alloc] init]; - params.timedInvokeTimeoutMs + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type mRequest; + uint16_t mValue; }; -/* - * Command EnhancedMoveHue - */ -class ColorControlEnhancedMoveHue : public ClusterCommand { +class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { public: - ColorControlEnhancedMoveHue() - : ClusterCommand("enhanced-move-hue") + SubscribeAttributeColorControlWhitePointX() + : SubscribeAttribute("white-point-x") { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlWhitePointX() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeWhitePointXWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointX response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type mRequest; }; /* - * Command EnhancedStepHue + * Attribute WhitePointY */ -class ColorControlEnhancedStepHue : public ClusterCommand { +class ReadColorControlWhitePointY : public ReadAttribute { public: - ColorControlEnhancedStepHue() - : ClusterCommand("enhanced-step-hue") + ReadColorControlWhitePointY() + : ReadAttribute("white-point-y") { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlWhitePointY() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedStepHueParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedStepHueWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointY response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl WhitePointY read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type mRequest; }; -/* - * Command EnhancedMoveToHueAndSaturation - */ -class ColorControlEnhancedMoveToHueAndSaturation : public ClusterCommand { +class WriteColorControlWhitePointY : public WriteAttribute { public: - ColorControlEnhancedMoveToHueAndSaturation() - : ClusterCommand("enhanced-move-to-hue-and-saturation") + WriteColorControlWhitePointY() + : WriteAttribute("white-point-y") { - AddArgument("EnhancedHue", 0, UINT16_MAX, &mRequest.enhancedHue); - AddArgument("Saturation", 0, UINT8_MAX, &mRequest.saturation); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); + AddArgument("attr-name", "white-point-y"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } + ~WriteColorControlWhitePointY() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterEnhancedMoveToHueAndSaturationParams alloc] init]; - params.timedInvokeTimeoutMs + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enhancedHue = [NSNumber numberWithUnsignedShort:mRequest.enhancedHue]; - params.saturation = [NSNumber numberWithUnsignedChar:mRequest.saturation]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster enhancedMoveToHueAndSaturationWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeWhitePointYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl WhitePointY write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type mRequest; + uint16_t mValue; }; -/* - * Command ColorLoopSet - */ -class ColorControlColorLoopSet : public ClusterCommand { +class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { public: - ColorControlColorLoopSet() - : ClusterCommand("color-loop-set") + SubscribeAttributeColorControlWhitePointY() + : SubscribeAttribute("white-point-y") { - AddArgument("UpdateFlags", 0, UINT8_MAX, &mRequest.updateFlags); - AddArgument("Action", 0, UINT8_MAX, &mRequest.action); - AddArgument("Direction", 0, UINT8_MAX, &mRequest.direction); - AddArgument("Time", 0, UINT16_MAX, &mRequest.time); - AddArgument("StartHue", 0, UINT16_MAX, &mRequest.startHue); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlWhitePointY() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterColorLoopSetParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateFlags = [NSNumber numberWithUnsignedChar:mRequest.updateFlags.Raw()]; - params.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.action)]; - params.direction = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.direction)]; - params.time = [NSNumber numberWithUnsignedShort:mRequest.time]; - params.startHue = [NSNumber numberWithUnsignedShort:mRequest.startHue]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster colorLoopSetWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeWhitePointYWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.WhitePointY response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type mRequest; }; /* - * Command StopMoveStep + * Attribute ColorPointRX */ -class ColorControlStopMoveStep : public ClusterCommand { +class ReadColorControlColorPointRX : public ReadAttribute { public: - ColorControlStopMoveStep() - : ClusterCommand("stop-move-step") + ReadColorControlColorPointRX() + : ReadAttribute("color-point-rx") { - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~ReadColorControlColorPointRX() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStopMoveStepParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopMoveStepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl ColorPointRX read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type mRequest; }; -/* - * Command MoveColorTemperature - */ -class ColorControlMoveColorTemperature : public ClusterCommand { +class WriteColorControlColorPointRX : public WriteAttribute { public: - ColorControlMoveColorTemperature() - : ClusterCommand("move-color-temperature") + WriteColorControlColorPointRX() + : WriteAttribute("color-point-rx") { - AddArgument("MoveMode", 0, UINT8_MAX, &mRequest.moveMode); - AddArgument("Rate", 0, UINT16_MAX, &mRequest.rate); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); + AddArgument("attr-name", "color-point-rx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } + ~WriteColorControlColorPointRX() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterMoveColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.moveMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.moveMode)]; - params.rate = [NSNumber numberWithUnsignedShort:mRequest.rate]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointRXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRX write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type mRequest; + uint16_t mValue; }; -/* - * Command StepColorTemperature - */ -class ColorControlStepColorTemperature : public ClusterCommand { +class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { public: - ColorControlStepColorTemperature() - : ClusterCommand("step-color-temperature") + SubscribeAttributeColorControlColorPointRX() + : SubscribeAttribute("color-point-rx") { - AddArgument("StepMode", 0, UINT8_MAX, &mRequest.stepMode); - AddArgument("StepSize", 0, UINT16_MAX, &mRequest.stepSize); - AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); - AddArgument("ColorTemperatureMinimumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMinimumMireds); - AddArgument("ColorTemperatureMaximumMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMaximumMireds); - AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); - AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeColorControlColorPointRX() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRColorControlClusterStepColorTemperatureParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.stepMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.stepMode)]; - params.stepSize = [NSNumber numberWithUnsignedShort:mRequest.stepSize]; - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; - params.colorTemperatureMinimumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMinimumMireds]; - params.colorTemperatureMaximumMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMaximumMireds]; - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stepColorTemperatureWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeColorPointRXWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type mRequest; }; /* - * Attribute CurrentHue + * Attribute ColorPointRY */ -class ReadColorControlCurrentHue : public ReadAttribute { +class ReadColorControlColorPointRY : public ReadAttribute { public: - ReadColorControlCurrentHue() - : ReadAttribute("current-hue") + ReadColorControlColorPointRY() + : ReadAttribute("color-point-ry") { } - ~ReadColorControlCurrentHue() {} + ~ReadColorControlColorPointRY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); + [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); if (error != nil) { - LogNSError("ColorControl CurrentHue read Error", error); + LogNSError("ColorControl ColorPointRY read Error", error); } SetCommandExitStatus(error); }]; @@ -56599,18 +65120,58 @@ class ReadColorControlCurrentHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { +class WriteColorControlColorPointRY : public WriteAttribute { public: - SubscribeAttributeColorControlCurrentHue() - : SubscribeAttribute("current-hue") + WriteColorControlColorPointRY() + : WriteAttribute("color-point-ry") { + AddArgument("attr-name", "color-point-ry"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlCurrentHue() {} + ~WriteColorControlColorPointRY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000033) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointRYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRY write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRY() + : SubscribeAttribute("color-point-ry") + { + } + + ~SubscribeAttributeColorControlColorPointRY() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -56625,12 +65186,12 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHueWithParams:params + [cluster subscribeAttributeColorPointRYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentHue response %@", [value description]); + NSLog(@"ColorControl.ColorPointRY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -56639,29 +65200,29 @@ class SubscribeAttributeColorControlCurrentHue : public SubscribeAttribute { }; /* - * Attribute CurrentSaturation + * Attribute ColorPointRIntensity */ -class ReadColorControlCurrentSaturation : public ReadAttribute { +class ReadColorControlColorPointRIntensity : public ReadAttribute { public: - ReadColorControlCurrentSaturation() - : ReadAttribute("current-saturation") + ReadColorControlColorPointRIntensity() + : ReadAttribute("color-point-rintensity") { } - ~ReadColorControlCurrentSaturation() {} + ~ReadColorControlColorPointRIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentSaturationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); + [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); if (error != nil) { - LogNSError("ColorControl CurrentSaturation read Error", error); + LogNSError("ColorControl ColorPointRIntensity read Error", error); } SetCommandExitStatus(error); }]; @@ -56669,18 +65230,58 @@ class ReadColorControlCurrentSaturation : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribute { +class WriteColorControlColorPointRIntensity : public WriteAttribute { public: - SubscribeAttributeColorControlCurrentSaturation() - : SubscribeAttribute("current-saturation") + WriteColorControlColorPointRIntensity() + : WriteAttribute("color-point-rintensity") { + AddArgument("attr-name", "color-point-rintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlCurrentSaturation() {} + ~WriteColorControlColorPointRIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000034) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeColorPointRIntensityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointRIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointRIntensity() + : SubscribeAttribute("color-point-rintensity") + { + } + + ~SubscribeAttributeColorControlColorPointRIntensity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -56695,12 +65296,12 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentSaturationWithParams:params + [cluster subscribeAttributeColorPointRIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentSaturation response %@", [value description]); + NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -56709,29 +65310,29 @@ class SubscribeAttributeColorControlCurrentSaturation : public SubscribeAttribut }; /* - * Attribute RemainingTime + * Attribute ColorPointGX */ -class ReadColorControlRemainingTime : public ReadAttribute { +class ReadColorControlColorPointGX : public ReadAttribute { public: - ReadColorControlRemainingTime() - : ReadAttribute("remaining-time") + ReadColorControlColorPointGX() + : ReadAttribute("color-point-gx") { } - ~ReadColorControlRemainingTime() {} + ~ReadColorControlColorPointGX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemainingTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); + [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); if (error != nil) { - LogNSError("ColorControl RemainingTime read Error", error); + LogNSError("ColorControl ColorPointGX read Error", error); } SetCommandExitStatus(error); }]; @@ -56739,18 +65340,58 @@ class ReadColorControlRemainingTime : public ReadAttribute { } }; -class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { +class WriteColorControlColorPointGX : public WriteAttribute { public: - SubscribeAttributeColorControlRemainingTime() - : SubscribeAttribute("remaining-time") + WriteColorControlColorPointGX() + : WriteAttribute("color-point-gx") { + AddArgument("attr-name", "color-point-gx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlRemainingTime() {} + ~WriteColorControlColorPointGX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000036) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGX write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGX() + : SubscribeAttribute("color-point-gx") + { + } + + ~SubscribeAttributeColorControlColorPointGX() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000036) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -56765,12 +65406,12 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemainingTimeWithParams:params + [cluster subscribeAttributeColorPointGXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.RemainingTime response %@", [value description]); + NSLog(@"ColorControl.ColorPointGX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -56779,29 +65420,29 @@ class SubscribeAttributeColorControlRemainingTime : public SubscribeAttribute { }; /* - * Attribute CurrentX + * Attribute ColorPointGY */ -class ReadColorControlCurrentX : public ReadAttribute { +class ReadColorControlColorPointGY : public ReadAttribute { public: - ReadColorControlCurrentX() - : ReadAttribute("current-x") + ReadColorControlColorPointGY() + : ReadAttribute("color-point-gy") { } - ~ReadColorControlCurrentX() {} + ~ReadColorControlColorPointGY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); + [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); if (error != nil) { - LogNSError("ColorControl CurrentX read Error", error); + LogNSError("ColorControl ColorPointGY read Error", error); } SetCommandExitStatus(error); }]; @@ -56809,18 +65450,58 @@ class ReadColorControlCurrentX : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { +class WriteColorControlColorPointGY : public WriteAttribute { public: - SubscribeAttributeColorControlCurrentX() - : SubscribeAttribute("current-x") + WriteColorControlColorPointGY() + : WriteAttribute("color-point-gy") { + AddArgument("attr-name", "color-point-gy"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlCurrentX() {} + ~WriteColorControlColorPointGY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000037) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointGYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGY write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGY() + : SubscribeAttribute("color-point-gy") + { + } + + ~SubscribeAttributeColorControlColorPointGY() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000037) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -56835,12 +65516,12 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentXWithParams:params + [cluster subscribeAttributeColorPointGYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentX response %@", [value description]); + NSLog(@"ColorControl.ColorPointGY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -56849,29 +65530,29 @@ class SubscribeAttributeColorControlCurrentX : public SubscribeAttribute { }; /* - * Attribute CurrentY + * Attribute ColorPointGIntensity */ -class ReadColorControlCurrentY : public ReadAttribute { +class ReadColorControlColorPointGIntensity : public ReadAttribute { public: - ReadColorControlCurrentY() - : ReadAttribute("current-y") + ReadColorControlColorPointGIntensity() + : ReadAttribute("color-point-gintensity") { } - ~ReadColorControlCurrentY() {} + ~ReadColorControlColorPointGIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); + [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); if (error != nil) { - LogNSError("ColorControl CurrentY read Error", error); + LogNSError("ColorControl ColorPointGIntensity read Error", error); } SetCommandExitStatus(error); }]; @@ -56879,18 +65560,58 @@ class ReadColorControlCurrentY : public ReadAttribute { } }; -class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { +class WriteColorControlColorPointGIntensity : public WriteAttribute { public: - SubscribeAttributeColorControlCurrentY() - : SubscribeAttribute("current-y") + WriteColorControlColorPointGIntensity() + : WriteAttribute("color-point-gintensity") { + AddArgument("attr-name", "color-point-gintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlCurrentY() {} + ~WriteColorControlColorPointGIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000038) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeColorPointGIntensityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointGIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointGIntensity() + : SubscribeAttribute("color-point-gintensity") + { + } + + ~SubscribeAttributeColorControlColorPointGIntensity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000038) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -56905,12 +65626,12 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentYWithParams:params + [cluster subscribeAttributeColorPointGIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CurrentY response %@", [value description]); + NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -56919,29 +65640,29 @@ class SubscribeAttributeColorControlCurrentY : public SubscribeAttribute { }; /* - * Attribute DriftCompensation + * Attribute ColorPointBX */ -class ReadColorControlDriftCompensation : public ReadAttribute { +class ReadColorControlColorPointBX : public ReadAttribute { public: - ReadColorControlDriftCompensation() - : ReadAttribute("drift-compensation") + ReadColorControlColorPointBX() + : ReadAttribute("color-point-bx") { } - ~ReadColorControlDriftCompensation() {} + ~ReadColorControlColorPointBX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDriftCompensationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); + [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); if (error != nil) { - LogNSError("ColorControl DriftCompensation read Error", error); + LogNSError("ColorControl ColorPointBX read Error", error); } SetCommandExitStatus(error); }]; @@ -56949,18 +65670,58 @@ class ReadColorControlDriftCompensation : public ReadAttribute { } }; -class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribute { +class WriteColorControlColorPointBX : public WriteAttribute { public: - SubscribeAttributeColorControlDriftCompensation() - : SubscribeAttribute("drift-compensation") + WriteColorControlColorPointBX() + : WriteAttribute("color-point-bx") { + AddArgument("attr-name", "color-point-bx"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlDriftCompensation() {} + ~WriteColorControlColorPointBX() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003A) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBXWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBX write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBX() + : SubscribeAttribute("color-point-bx") + { + } + + ~SubscribeAttributeColorControlColorPointBX() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -56975,12 +65736,12 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDriftCompensationWithParams:params + [cluster subscribeAttributeColorPointBXWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.DriftCompensation response %@", [value description]); + NSLog(@"ColorControl.ColorPointBX response %@", [value description]); SetCommandExitStatus(error); }]; @@ -56989,29 +65750,29 @@ class SubscribeAttributeColorControlDriftCompensation : public SubscribeAttribut }; /* - * Attribute CompensationText + * Attribute ColorPointBY */ -class ReadColorControlCompensationText : public ReadAttribute { +class ReadColorControlColorPointBY : public ReadAttribute { public: - ReadColorControlCompensationText() - : ReadAttribute("compensation-text") + ReadColorControlColorPointBY() + : ReadAttribute("color-point-by") { } - ~ReadColorControlCompensationText() {} + ~ReadColorControlColorPointBY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCompensationTextWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); + [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); if (error != nil) { - LogNSError("ColorControl CompensationText read Error", error); + LogNSError("ColorControl ColorPointBY read Error", error); } SetCommandExitStatus(error); }]; @@ -57019,18 +65780,58 @@ class ReadColorControlCompensationText : public ReadAttribute { } }; -class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute { +class WriteColorControlColorPointBY : public WriteAttribute { public: - SubscribeAttributeColorControlCompensationText() - : SubscribeAttribute("compensation-text") + WriteColorControlColorPointBY() + : WriteAttribute("color-point-by") + { + AddArgument("attr-name", "color-point-by"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteColorControlColorPointBY() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeColorPointBYWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBY write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBY() + : SubscribeAttribute("color-point-by") { } - ~SubscribeAttributeColorControlCompensationText() {} + ~SubscribeAttributeColorControlColorPointBY() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57045,12 +65846,12 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCompensationTextWithParams:params + [cluster subscribeAttributeColorPointBYWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CompensationText response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBY response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57059,29 +65860,29 @@ class SubscribeAttributeColorControlCompensationText : public SubscribeAttribute }; /* - * Attribute ColorTemperatureMireds + * Attribute ColorPointBIntensity */ -class ReadColorControlColorTemperatureMireds : public ReadAttribute { +class ReadColorControlColorPointBIntensity : public ReadAttribute { public: - ReadColorControlColorTemperatureMireds() - : ReadAttribute("color-temperature-mireds") + ReadColorControlColorPointBIntensity() + : ReadAttribute("color-point-bintensity") { } - ~ReadColorControlColorTemperatureMireds() {} + ~ReadColorControlColorPointBIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); + [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorTemperatureMireds read Error", error); + LogNSError("ColorControl ColorPointBIntensity read Error", error); } SetCommandExitStatus(error); }]; @@ -57089,18 +65890,58 @@ class ReadColorControlColorTemperatureMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAttribute { +class WriteColorControlColorPointBIntensity : public WriteAttribute { public: - SubscribeAttributeColorControlColorTemperatureMireds() - : SubscribeAttribute("color-temperature-mireds") + WriteColorControlColorPointBIntensity() + : WriteAttribute("color-point-bintensity") { + AddArgument("attr-name", "color-point-bintensity"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeColorControlColorTemperatureMireds() {} + ~WriteColorControlColorPointBIntensity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003C) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeColorPointBIntensityWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ColorControl ColorPointBIntensity write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { +public: + SubscribeAttributeColorControlColorPointBIntensity() + : SubscribeAttribute("color-point-bintensity") + { + } + + ~SubscribeAttributeColorControlColorPointBIntensity() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57115,12 +65956,12 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTemperatureMiredsWithParams:params + [cluster subscribeAttributeColorPointBIntensityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTemperatureMireds response %@", [value description]); + NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57129,29 +65970,29 @@ class SubscribeAttributeColorControlColorTemperatureMireds : public SubscribeAtt }; /* - * Attribute ColorMode + * Attribute EnhancedCurrentHue */ -class ReadColorControlColorMode : public ReadAttribute { +class ReadColorControlEnhancedCurrentHue : public ReadAttribute { public: - ReadColorControlColorMode() - : ReadAttribute("color-mode") + ReadColorControlEnhancedCurrentHue() + : ReadAttribute("enhanced-current-hue") { } - ~ReadColorControlColorMode() {} + ~ReadColorControlEnhancedCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); + [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorMode read Error", error); + LogNSError("ColorControl EnhancedCurrentHue read Error", error); } SetCommandExitStatus(error); }]; @@ -57159,18 +66000,18 @@ class ReadColorControlColorMode : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorMode() - : SubscribeAttribute("color-mode") + SubscribeAttributeColorControlEnhancedCurrentHue() + : SubscribeAttribute("enhanced-current-hue") { } - ~SubscribeAttributeColorControlColorMode() {} + ~SubscribeAttributeColorControlEnhancedCurrentHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57185,12 +66026,12 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorModeWithParams:params + [cluster subscribeAttributeEnhancedCurrentHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorMode response %@", [value description]); + NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57199,29 +66040,29 @@ class SubscribeAttributeColorControlColorMode : public SubscribeAttribute { }; /* - * Attribute Options + * Attribute EnhancedColorMode */ -class ReadColorControlOptions : public ReadAttribute { +class ReadColorControlEnhancedColorMode : public ReadAttribute { public: - ReadColorControlOptions() - : ReadAttribute("options") + ReadColorControlEnhancedColorMode() + : ReadAttribute("enhanced-color-mode") { } - ~ReadColorControlOptions() {} + ~ReadColorControlEnhancedColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000000F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOptionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); + [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Options read Error", error); + LogNSError("ColorControl EnhancedColorMode read Error", error); } SetCommandExitStatus(error); }]; @@ -57229,58 +66070,18 @@ class ReadColorControlOptions : public ReadAttribute { } }; -class WriteColorControlOptions : public WriteAttribute { -public: - WriteColorControlOptions() - : WriteAttribute("options") - { - AddArgument("attr-name", "options"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlOptions() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000000F) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOptionsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl Options write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeColorControlOptions : public SubscribeAttribute { +class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { public: - SubscribeAttributeColorControlOptions() - : SubscribeAttribute("options") + SubscribeAttributeColorControlEnhancedColorMode() + : SubscribeAttribute("enhanced-color-mode") { } - ~SubscribeAttributeColorControlOptions() {} + ~SubscribeAttributeColorControlEnhancedColorMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000000F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57295,12 +66096,12 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOptionsWithParams:params + [cluster subscribeAttributeEnhancedColorModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Options response %@", [value description]); + NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57309,29 +66110,29 @@ class SubscribeAttributeColorControlOptions : public SubscribeAttribute { }; /* - * Attribute NumberOfPrimaries + * Attribute ColorLoopActive */ -class ReadColorControlNumberOfPrimaries : public ReadAttribute { +class ReadColorControlColorLoopActive : public ReadAttribute { public: - ReadColorControlNumberOfPrimaries() - : ReadAttribute("number-of-primaries") + ReadColorControlColorLoopActive() + : ReadAttribute("color-loop-active") { } - ~ReadColorControlNumberOfPrimaries() {} + ~ReadColorControlColorLoopActive() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPrimariesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); + [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); if (error != nil) { - LogNSError("ColorControl NumberOfPrimaries read Error", error); + LogNSError("ColorControl ColorLoopActive read Error", error); } SetCommandExitStatus(error); }]; @@ -57339,18 +66140,18 @@ class ReadColorControlNumberOfPrimaries : public ReadAttribute { } }; -class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { public: - SubscribeAttributeColorControlNumberOfPrimaries() - : SubscribeAttribute("number-of-primaries") + SubscribeAttributeColorControlColorLoopActive() + : SubscribeAttribute("color-loop-active") { } - ~SubscribeAttributeColorControlNumberOfPrimaries() {} + ~SubscribeAttributeColorControlColorLoopActive() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57365,12 +66166,12 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfPrimariesWithParams:params + [cluster subscribeAttributeColorLoopActiveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.NumberOfPrimaries response %@", [value description]); + NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57379,29 +66180,29 @@ class SubscribeAttributeColorControlNumberOfPrimaries : public SubscribeAttribut }; /* - * Attribute Primary1X + * Attribute ColorLoopDirection */ -class ReadColorControlPrimary1X : public ReadAttribute { +class ReadColorControlColorLoopDirection : public ReadAttribute { public: - ReadColorControlPrimary1X() - : ReadAttribute("primary1x") + ReadColorControlColorLoopDirection() + : ReadAttribute("color-loop-direction") { } - ~ReadColorControlPrimary1X() {} + ~ReadColorControlColorLoopDirection() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); + [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary1X read Error", error); + LogNSError("ColorControl ColorLoopDirection read Error", error); } SetCommandExitStatus(error); }]; @@ -57409,18 +66210,18 @@ class ReadColorControlPrimary1X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary1X() - : SubscribeAttribute("primary1x") + SubscribeAttributeColorControlColorLoopDirection() + : SubscribeAttribute("color-loop-direction") { } - ~SubscribeAttributeColorControlPrimary1X() {} + ~SubscribeAttributeColorControlColorLoopDirection() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57435,12 +66236,12 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary1XWithParams:params + [cluster subscribeAttributeColorLoopDirectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1X response %@", [value description]); + NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57449,29 +66250,29 @@ class SubscribeAttributeColorControlPrimary1X : public SubscribeAttribute { }; /* - * Attribute Primary1Y + * Attribute ColorLoopTime */ -class ReadColorControlPrimary1Y : public ReadAttribute { +class ReadColorControlColorLoopTime : public ReadAttribute { public: - ReadColorControlPrimary1Y() - : ReadAttribute("primary1y") + ReadColorControlColorLoopTime() + : ReadAttribute("color-loop-time") { } - ~ReadColorControlPrimary1Y() {} + ~ReadColorControlColorLoopTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); + [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary1Y read Error", error); + LogNSError("ColorControl ColorLoopTime read Error", error); } SetCommandExitStatus(error); }]; @@ -57479,18 +66280,18 @@ class ReadColorControlPrimary1Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary1Y() - : SubscribeAttribute("primary1y") + SubscribeAttributeColorControlColorLoopTime() + : SubscribeAttribute("color-loop-time") { } - ~SubscribeAttributeColorControlPrimary1Y() {} + ~SubscribeAttributeColorControlColorLoopTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57505,12 +66306,12 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary1YWithParams:params + [cluster subscribeAttributeColorLoopTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Y response %@", [value description]); + NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57519,29 +66320,29 @@ class SubscribeAttributeColorControlPrimary1Y : public SubscribeAttribute { }; /* - * Attribute Primary1Intensity + * Attribute ColorLoopStartEnhancedHue */ -class ReadColorControlPrimary1Intensity : public ReadAttribute { +class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { public: - ReadColorControlPrimary1Intensity() - : ReadAttribute("primary1intensity") + ReadColorControlColorLoopStartEnhancedHue() + : ReadAttribute("color-loop-start-enhanced-hue") { } - ~ReadColorControlPrimary1Intensity() {} + ~ReadColorControlColorLoopStartEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary1IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); + [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary1Intensity read Error", error); + LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); } SetCommandExitStatus(error); }]; @@ -57549,18 +66350,18 @@ class ReadColorControlPrimary1Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary1Intensity() - : SubscribeAttribute("primary1intensity") + SubscribeAttributeColorControlColorLoopStartEnhancedHue() + : SubscribeAttribute("color-loop-start-enhanced-hue") { } - ~SubscribeAttributeColorControlPrimary1Intensity() {} + ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57575,12 +66376,12 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary1IntensityWithParams:params + [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary1Intensity response %@", [value description]); + NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57589,29 +66390,29 @@ class SubscribeAttributeColorControlPrimary1Intensity : public SubscribeAttribut }; /* - * Attribute Primary2X + * Attribute ColorLoopStoredEnhancedHue */ -class ReadColorControlPrimary2X : public ReadAttribute { +class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { public: - ReadColorControlPrimary2X() - : ReadAttribute("primary2x") + ReadColorControlColorLoopStoredEnhancedHue() + : ReadAttribute("color-loop-stored-enhanced-hue") { } - ~ReadColorControlPrimary2X() {} + ~ReadColorControlColorLoopStoredEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); + [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary2X read Error", error); + LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); } SetCommandExitStatus(error); }]; @@ -57619,18 +66420,18 @@ class ReadColorControlPrimary2X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { +class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary2X() - : SubscribeAttribute("primary2x") + SubscribeAttributeColorControlColorLoopStoredEnhancedHue() + : SubscribeAttribute("color-loop-stored-enhanced-hue") { } - ~SubscribeAttributeColorControlPrimary2X() {} + ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57645,12 +66446,12 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary2XWithParams:params + [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2X response %@", [value description]); + NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57659,29 +66460,29 @@ class SubscribeAttributeColorControlPrimary2X : public SubscribeAttribute { }; /* - * Attribute Primary2Y + * Attribute ColorCapabilities */ -class ReadColorControlPrimary2Y : public ReadAttribute { +class ReadColorControlColorCapabilities : public ReadAttribute { public: - ReadColorControlPrimary2Y() - : ReadAttribute("primary2y") + ReadColorControlColorCapabilities() + : ReadAttribute("color-capabilities") { } - ~ReadColorControlPrimary2Y() {} + ~ReadColorControlColorCapabilities() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); + [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary2Y read Error", error); + LogNSError("ColorControl ColorCapabilities read Error", error); } SetCommandExitStatus(error); }]; @@ -57689,18 +66490,18 @@ class ReadColorControlPrimary2Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { +class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary2Y() - : SubscribeAttribute("primary2y") + SubscribeAttributeColorControlColorCapabilities() + : SubscribeAttribute("color-capabilities") { } - ~SubscribeAttributeColorControlPrimary2Y() {} + ~SubscribeAttributeColorControlColorCapabilities() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000016) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57715,12 +66516,12 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary2YWithParams:params + [cluster subscribeAttributeColorCapabilitiesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Y response %@", [value description]); + NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57729,29 +66530,29 @@ class SubscribeAttributeColorControlPrimary2Y : public SubscribeAttribute { }; /* - * Attribute Primary2Intensity + * Attribute ColorTempPhysicalMinMireds */ -class ReadColorControlPrimary2Intensity : public ReadAttribute { +class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { public: - ReadColorControlPrimary2Intensity() - : ReadAttribute("primary2intensity") + ReadColorControlColorTempPhysicalMinMireds() + : ReadAttribute("color-temp-physical-min-mireds") { } - ~ReadColorControlPrimary2Intensity() {} + ~ReadColorControlColorTempPhysicalMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary2IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary2Intensity read Error", error); + LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); } SetCommandExitStatus(error); }]; @@ -57759,18 +66560,18 @@ class ReadColorControlPrimary2Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary2Intensity() - : SubscribeAttribute("primary2intensity") + SubscribeAttributeColorControlColorTempPhysicalMinMireds() + : SubscribeAttribute("color-temp-physical-min-mireds") { } - ~SubscribeAttributeColorControlPrimary2Intensity() {} + ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000017) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57785,12 +66586,12 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary2IntensityWithParams:params + [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary2Intensity response %@", [value description]); + NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57799,29 +66600,29 @@ class SubscribeAttributeColorControlPrimary2Intensity : public SubscribeAttribut }; /* - * Attribute Primary3X + * Attribute ColorTempPhysicalMaxMireds */ -class ReadColorControlPrimary3X : public ReadAttribute { +class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { public: - ReadColorControlPrimary3X() - : ReadAttribute("primary3x") + ReadColorControlColorTempPhysicalMaxMireds() + : ReadAttribute("color-temp-physical-max-mireds") { } - ~ReadColorControlPrimary3X() {} + ~ReadColorControlColorTempPhysicalMaxMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000019) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); + [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary3X read Error", error); + LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); } SetCommandExitStatus(error); }]; @@ -57829,18 +66630,18 @@ class ReadColorControlPrimary3X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { +class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary3X() - : SubscribeAttribute("primary3x") + SubscribeAttributeColorControlColorTempPhysicalMaxMireds() + : SubscribeAttribute("color-temp-physical-max-mireds") { } - ~SubscribeAttributeColorControlPrimary3X() {} + ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000019) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57855,12 +66656,12 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary3XWithParams:params + [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3X response %@", [value description]); + NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57869,48 +66670,49 @@ class SubscribeAttributeColorControlPrimary3X : public SubscribeAttribute { }; /* - * Attribute Primary3Y + * Attribute CoupleColorTempToLevelMinMireds */ -class ReadColorControlPrimary3Y : public ReadAttribute { +class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { public: - ReadColorControlPrimary3Y() - : ReadAttribute("primary3y") + ReadColorControlCoupleColorTempToLevelMinMireds() + : ReadAttribute("couple-color-temp-to-level-min-mireds") { } - ~ReadColorControlPrimary3Y() {} + ~ReadColorControlCoupleColorTempToLevelMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary3Y read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { +class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary3Y() - : SubscribeAttribute("primary3y") + SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() + : SubscribeAttribute("couple-color-temp-to-level-min-mireds") { } - ~SubscribeAttributeColorControlPrimary3Y() {} + ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57925,12 +66727,12 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary3YWithParams:params + [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Y response %@", [value description]); + NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -57938,49 +66740,91 @@ class SubscribeAttributeColorControlPrimary3Y : public SubscribeAttribute { } }; -/* - * Attribute Primary3Intensity - */ -class ReadColorControlPrimary3Intensity : public ReadAttribute { +/* + * Attribute StartUpColorTemperatureMireds + */ +class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { +public: + ReadColorControlStartUpColorTemperatureMireds() + : ReadAttribute("start-up-color-temperature-mireds") + { + } + + ~ReadColorControlStartUpColorTemperatureMireds() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004010) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + if (error != nil) { + LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { public: - ReadColorControlPrimary3Intensity() - : ReadAttribute("primary3intensity") + WriteColorControlStartUpColorTemperatureMireds() + : WriteAttribute("start-up-color-temperature-mireds") { + AddArgument("attr-name", "start-up-color-temperature-mireds"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadColorControlPrimary3Intensity() {} + ~WriteColorControlStartUpColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000001B) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary3IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl Primary3Intensity read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeStartUpColorTemperatureMiredsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ColorControl StartUpColorTemperatureMireds write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } + +private: + uint16_t mValue; }; -class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary3Intensity() - : SubscribeAttribute("primary3intensity") + SubscribeAttributeColorControlStartUpColorTemperatureMireds() + : SubscribeAttribute("start-up-color-temperature-mireds") { } - ~SubscribeAttributeColorControlPrimary3Intensity() {} + ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000001B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -57995,12 +66839,12 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary3IntensityWithParams:params + [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary3Intensity response %@", [value description]); + NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58009,29 +66853,29 @@ class SubscribeAttributeColorControlPrimary3Intensity : public SubscribeAttribut }; /* - * Attribute Primary4X + * Attribute GeneratedCommandList */ -class ReadColorControlPrimary4X : public ReadAttribute { +class ReadColorControlGeneratedCommandList : public ReadAttribute { public: - ReadColorControlPrimary4X() - : ReadAttribute("primary4x") + ReadColorControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadColorControlPrimary4X() {} + ~ReadColorControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary4X read Error", error); + LogNSError("ColorControl GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -58039,18 +66883,18 @@ class ReadColorControlPrimary4X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { +class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary4X() - : SubscribeAttribute("primary4x") + SubscribeAttributeColorControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeColorControlPrimary4X() {} + ~SubscribeAttributeColorControlGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -58065,12 +66909,12 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary4XWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4X response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58079,29 +66923,29 @@ class SubscribeAttributeColorControlPrimary4X : public SubscribeAttribute { }; /* - * Attribute Primary4Y + * Attribute AcceptedCommandList */ -class ReadColorControlPrimary4Y : public ReadAttribute { +class ReadColorControlAcceptedCommandList : public ReadAttribute { public: - ReadColorControlPrimary4Y() - : ReadAttribute("primary4y") + ReadColorControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadColorControlPrimary4Y() {} + ~ReadColorControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary4Y read Error", error); + LogNSError("ColorControl AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -58109,18 +66953,18 @@ class ReadColorControlPrimary4Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { +class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary4Y() - : SubscribeAttribute("primary4y") + SubscribeAttributeColorControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeColorControlPrimary4Y() {} + ~SubscribeAttributeColorControlAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -58135,12 +66979,12 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary4YWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Y response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58149,29 +66993,29 @@ class SubscribeAttributeColorControlPrimary4Y : public SubscribeAttribute { }; /* - * Attribute Primary4Intensity + * Attribute EventList */ -class ReadColorControlPrimary4Intensity : public ReadAttribute { +class ReadColorControlEventList : public ReadAttribute { public: - ReadColorControlPrimary4Intensity() - : ReadAttribute("primary4intensity") + ReadColorControlEventList() + : ReadAttribute("event-list") { } - ~ReadColorControlPrimary4Intensity() {} + ~ReadColorControlEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary4IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EventList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary4Intensity read Error", error); + LogNSError("ColorControl EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -58179,18 +67023,18 @@ class ReadColorControlPrimary4Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlEventList : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary4Intensity() - : SubscribeAttribute("primary4intensity") + SubscribeAttributeColorControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeColorControlPrimary4Intensity() {} + ~SubscribeAttributeColorControlEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -58205,12 +67049,12 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary4IntensityWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary4Intensity response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58219,29 +67063,29 @@ class SubscribeAttributeColorControlPrimary4Intensity : public SubscribeAttribut }; /* - * Attribute Primary5X + * Attribute AttributeList */ -class ReadColorControlPrimary5X : public ReadAttribute { +class ReadColorControlAttributeList : public ReadAttribute { public: - ReadColorControlPrimary5X() - : ReadAttribute("primary5x") + ReadColorControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadColorControlPrimary5X() {} + ~ReadColorControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000024) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary5X read Error", error); + LogNSError("ColorControl AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -58249,18 +67093,18 @@ class ReadColorControlPrimary5X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { +class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary5X() - : SubscribeAttribute("primary5x") + SubscribeAttributeColorControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeColorControlPrimary5X() {} + ~SubscribeAttributeColorControlAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000024) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -58275,12 +67119,12 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary5XWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5X response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58289,29 +67133,29 @@ class SubscribeAttributeColorControlPrimary5X : public SubscribeAttribute { }; /* - * Attribute Primary5Y + * Attribute FeatureMap */ -class ReadColorControlPrimary5Y : public ReadAttribute { +class ReadColorControlFeatureMap : public ReadAttribute { public: - ReadColorControlPrimary5Y() - : ReadAttribute("primary5y") + ReadColorControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadColorControlPrimary5Y() {} + ~ReadColorControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000025) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary5Y read Error", error); + LogNSError("ColorControl FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -58319,18 +67163,18 @@ class ReadColorControlPrimary5Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { +class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary5Y() - : SubscribeAttribute("primary5y") + SubscribeAttributeColorControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeColorControlPrimary5Y() {} + ~SubscribeAttributeColorControlFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000025) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -58345,12 +67189,12 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary5YWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Y response %@", [value description]); + NSLog(@"ColorControl.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58359,29 +67203,29 @@ class SubscribeAttributeColorControlPrimary5Y : public SubscribeAttribute { }; /* - * Attribute Primary5Intensity + * Attribute ClusterRevision */ -class ReadColorControlPrimary5Intensity : public ReadAttribute { +class ReadColorControlClusterRevision : public ReadAttribute { public: - ReadColorControlPrimary5Intensity() - : ReadAttribute("primary5intensity") + ReadColorControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadColorControlPrimary5Intensity() {} + ~ReadColorControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000026) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePrimary5IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary5Intensity read Error", error); + LogNSError("ColorControl ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -58389,18 +67233,18 @@ class ReadColorControlPrimary5Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribute { +class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary5Intensity() - : SubscribeAttribute("primary5intensity") + SubscribeAttributeColorControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeColorControlPrimary5Intensity() {} + ~SubscribeAttributeColorControlClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000026) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device endpointID:@(endpointId) @@ -58415,12 +67259,12 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary5IntensityWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary5Intensity response %@", [value description]); + NSLog(@"ColorControl.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58428,30 +67272,60 @@ class SubscribeAttributeColorControlPrimary5Intensity : public SubscribeAttribut } }; +/*----------------------------------------------------------------------------*\ +| Cluster BallastConfiguration | 0x0301 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PhysicalMinLevel | 0x0000 | +| * PhysicalMaxLevel | 0x0001 | +| * BallastStatus | 0x0002 | +| * MinLevel | 0x0010 | +| * MaxLevel | 0x0011 | +| * IntrinsicBallastFactor | 0x0014 | +| * BallastFactorAdjustment | 0x0015 | +| * LampQuantity | 0x0020 | +| * LampType | 0x0030 | +| * LampManufacturer | 0x0031 | +| * LampRatedHours | 0x0032 | +| * LampBurnHours | 0x0033 | +| * LampAlarmMode | 0x0034 | +| * LampBurnHoursTripPoint | 0x0035 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute Primary6X + * Attribute PhysicalMinLevel */ -class ReadColorControlPrimary6X : public ReadAttribute { +class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { public: - ReadColorControlPrimary6X() - : ReadAttribute("primary6x") + ReadBallastConfigurationPhysicalMinLevel() + : ReadAttribute("physical-min-level") { } - ~ReadColorControlPrimary6X() {} + ~ReadBallastConfigurationPhysicalMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000028) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6XWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary6X read Error", error); + LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -58459,22 +67333,22 @@ class ReadColorControlPrimary6X : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary6X() - : SubscribeAttribute("primary6x") + SubscribeAttributeBallastConfigurationPhysicalMinLevel() + : SubscribeAttribute("physical-min-level") { } - ~SubscribeAttributeColorControlPrimary6X() {} + ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000028) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58485,12 +67359,12 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary6XWithParams:params + [cluster subscribeAttributePhysicalMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6X response %@", [value description]); + NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58499,29 +67373,29 @@ class SubscribeAttributeColorControlPrimary6X : public SubscribeAttribute { }; /* - * Attribute Primary6Y + * Attribute PhysicalMaxLevel */ -class ReadColorControlPrimary6Y : public ReadAttribute { +class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { public: - ReadColorControlPrimary6Y() - : ReadAttribute("primary6y") + ReadBallastConfigurationPhysicalMaxLevel() + : ReadAttribute("physical-max-level") { } - ~ReadColorControlPrimary6Y() {} + ~ReadBallastConfigurationPhysicalMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000029) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6YWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary6Y read Error", error); + LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -58529,22 +67403,22 @@ class ReadColorControlPrimary6Y : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary6Y() - : SubscribeAttribute("primary6y") + SubscribeAttributeBallastConfigurationPhysicalMaxLevel() + : SubscribeAttribute("physical-max-level") { } - ~SubscribeAttributeColorControlPrimary6Y() {} + ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000029) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58555,12 +67429,12 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary6YWithParams:params + [cluster subscribeAttributePhysicalMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Y response %@", [value description]); + NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58569,29 +67443,29 @@ class SubscribeAttributeColorControlPrimary6Y : public SubscribeAttribute { }; /* - * Attribute Primary6Intensity + * Attribute BallastStatus */ -class ReadColorControlPrimary6Intensity : public ReadAttribute { +class ReadBallastConfigurationBallastStatus : public ReadAttribute { public: - ReadColorControlPrimary6Intensity() - : ReadAttribute("primary6intensity") + ReadBallastConfigurationBallastStatus() + : ReadAttribute("ballast-status") { } - ~ReadColorControlPrimary6Intensity() {} + ~ReadBallastConfigurationBallastStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000002A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePrimary6IntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); if (error != nil) { - LogNSError("ColorControl Primary6Intensity read Error", error); + LogNSError("BallastConfiguration BallastStatus read Error", error); } SetCommandExitStatus(error); }]; @@ -58599,22 +67473,22 @@ class ReadColorControlPrimary6Intensity : public ReadAttribute { } }; -class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { public: - SubscribeAttributeColorControlPrimary6Intensity() - : SubscribeAttribute("primary6intensity") + SubscribeAttributeBallastConfigurationBallastStatus() + : SubscribeAttribute("ballast-status") { } - ~SubscribeAttributeColorControlPrimary6Intensity() {} + ~SubscribeAttributeBallastConfigurationBallastStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000002A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58625,12 +67499,12 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePrimary6IntensityWithParams:params + [cluster subscribeAttributeBallastStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.Primary6Intensity response %@", [value description]); + NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58639,29 +67513,29 @@ class SubscribeAttributeColorControlPrimary6Intensity : public SubscribeAttribut }; /* - * Attribute WhitePointX + * Attribute MinLevel */ -class ReadColorControlWhitePointX : public ReadAttribute { +class ReadBallastConfigurationMinLevel : public ReadAttribute { public: - ReadColorControlWhitePointX() - : ReadAttribute("white-point-x") + ReadBallastConfigurationMinLevel() + : ReadAttribute("min-level") { } - ~ReadColorControlWhitePointX() {} + ~ReadBallastConfigurationMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWhitePointXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); if (error != nil) { - LogNSError("ColorControl WhitePointX read Error", error); + LogNSError("BallastConfiguration MinLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -58669,62 +67543,62 @@ class ReadColorControlWhitePointX : public ReadAttribute { } }; -class WriteColorControlWhitePointX : public WriteAttribute { +class WriteBallastConfigurationMinLevel : public WriteAttribute { public: - WriteColorControlWhitePointX() - : WriteAttribute("white-point-x") + WriteBallastConfigurationMinLevel() + : WriteAttribute("min-level") { - AddArgument("attr-name", "white-point-x"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "min-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlWhitePointX() {} + ~WriteBallastConfigurationMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeWhitePointXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointX write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeMinLevelWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MinLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { public: - SubscribeAttributeColorControlWhitePointX() - : SubscribeAttribute("white-point-x") + SubscribeAttributeBallastConfigurationMinLevel() + : SubscribeAttribute("min-level") { } - ~SubscribeAttributeColorControlWhitePointX() {} + ~SubscribeAttributeBallastConfigurationMinLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58735,12 +67609,12 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWhitePointXWithParams:params + [cluster subscribeAttributeMinLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointX response %@", [value description]); + NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58749,29 +67623,29 @@ class SubscribeAttributeColorControlWhitePointX : public SubscribeAttribute { }; /* - * Attribute WhitePointY + * Attribute MaxLevel */ -class ReadColorControlWhitePointY : public ReadAttribute { +class ReadBallastConfigurationMaxLevel : public ReadAttribute { public: - ReadColorControlWhitePointY() - : ReadAttribute("white-point-y") + ReadBallastConfigurationMaxLevel() + : ReadAttribute("max-level") { } - ~ReadColorControlWhitePointY() {} + ~ReadBallastConfigurationMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeWhitePointYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); if (error != nil) { - LogNSError("ColorControl WhitePointY read Error", error); + LogNSError("BallastConfiguration MaxLevel read Error", error); } SetCommandExitStatus(error); }]; @@ -58779,62 +67653,62 @@ class ReadColorControlWhitePointY : public ReadAttribute { } }; -class WriteColorControlWhitePointY : public WriteAttribute { +class WriteBallastConfigurationMaxLevel : public WriteAttribute { public: - WriteColorControlWhitePointY() - : WriteAttribute("white-point-y") + WriteBallastConfigurationMaxLevel() + : WriteAttribute("max-level") { - AddArgument("attr-name", "white-point-y"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "max-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlWhitePointY() {} + ~WriteBallastConfigurationMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeWhitePointYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl WhitePointY write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeMaxLevelWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration MaxLevel write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { public: - SubscribeAttributeColorControlWhitePointY() - : SubscribeAttribute("white-point-y") + SubscribeAttributeBallastConfigurationMaxLevel() + : SubscribeAttribute("max-level") { } - ~SubscribeAttributeColorControlWhitePointY() {} + ~SubscribeAttributeBallastConfigurationMaxLevel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58845,12 +67719,12 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWhitePointYWithParams:params + [cluster subscribeAttributeMaxLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.WhitePointY response %@", [value description]); + NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58859,29 +67733,29 @@ class SubscribeAttributeColorControlWhitePointY : public SubscribeAttribute { }; /* - * Attribute ColorPointRX + * Attribute IntrinsicBallastFactor */ -class ReadColorControlColorPointRX : public ReadAttribute { +class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { public: - ReadColorControlColorPointRX() - : ReadAttribute("color-point-rx") + ReadBallastConfigurationIntrinsicBallastFactor() + : ReadAttribute("intrinsic-ballast-factor") { } - ~ReadColorControlColorPointRX() {} + ~ReadBallastConfigurationIntrinsicBallastFactor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointRX read Error", error); + LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); } SetCommandExitStatus(error); }]; @@ -58889,62 +67763,63 @@ class ReadColorControlColorPointRX : public ReadAttribute { } }; -class WriteColorControlColorPointRX : public WriteAttribute { +class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { public: - WriteColorControlColorPointRX() - : WriteAttribute("color-point-rx") + WriteBallastConfigurationIntrinsicBallastFactor() + : WriteAttribute("intrinsic-ballast-factor") { - AddArgument("attr-name", "color-point-rx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "intrinsic-ballast-factor"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointRX() {} + ~WriteBallastConfigurationIntrinsicBallastFactor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeColorPointRXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRX write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeIntrinsicBallastFactorWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointRX() - : SubscribeAttribute("color-point-rx") + SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() + : SubscribeAttribute("intrinsic-ballast-factor") { } - ~SubscribeAttributeColorControlColorPointRX() {} + ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -58955,12 +67830,12 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointRXWithParams:params + [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRX response %@", [value description]); + NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -58969,29 +67844,29 @@ class SubscribeAttributeColorControlColorPointRX : public SubscribeAttribute { }; /* - * Attribute ColorPointRY + * Attribute BallastFactorAdjustment */ -class ReadColorControlColorPointRY : public ReadAttribute { +class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { public: - ReadColorControlColorPointRY() - : ReadAttribute("color-point-ry") + ReadBallastConfigurationBallastFactorAdjustment() + : ReadAttribute("ballast-factor-adjustment") { } - ~ReadColorControlColorPointRY() {} + ~ReadBallastConfigurationBallastFactorAdjustment() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointRY read Error", error); + LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); } SetCommandExitStatus(error); }]; @@ -58999,62 +67874,63 @@ class ReadColorControlColorPointRY : public ReadAttribute { } }; -class WriteColorControlColorPointRY : public WriteAttribute { +class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { public: - WriteColorControlColorPointRY() - : WriteAttribute("color-point-ry") + WriteBallastConfigurationBallastFactorAdjustment() + : WriteAttribute("ballast-factor-adjustment") { - AddArgument("attr-name", "color-point-ry"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "ballast-factor-adjustment"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointRY() {} + ~WriteBallastConfigurationBallastFactorAdjustment() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeColorPointRYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRY write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeBallastFactorAdjustmentWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "BallastConfiguration BallastFactorAdjustment write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointRY() - : SubscribeAttribute("color-point-ry") + SubscribeAttributeBallastConfigurationBallastFactorAdjustment() + : SubscribeAttribute("ballast-factor-adjustment") { } - ~SubscribeAttributeColorControlColorPointRY() {} + ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000015) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59065,12 +67941,12 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointRYWithParams:params + [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRY response %@", [value description]); + NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59079,29 +67955,29 @@ class SubscribeAttributeColorControlColorPointRY : public SubscribeAttribute { }; /* - * Attribute ColorPointRIntensity + * Attribute LampQuantity */ -class ReadColorControlColorPointRIntensity : public ReadAttribute { +class ReadBallastConfigurationLampQuantity : public ReadAttribute { public: - ReadColorControlColorPointRIntensity() - : ReadAttribute("color-point-rintensity") + ReadBallastConfigurationLampQuantity() + : ReadAttribute("lamp-quantity") { } - ~ReadColorControlColorPointRIntensity() {} + ~ReadBallastConfigurationLampQuantity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointRIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity read Error", error); + LogNSError("BallastConfiguration LampQuantity read Error", error); } SetCommandExitStatus(error); }]; @@ -59109,62 +67985,22 @@ class ReadColorControlColorPointRIntensity : public ReadAttribute { } }; -class WriteColorControlColorPointRIntensity : public WriteAttribute { -public: - WriteColorControlColorPointRIntensity() - : WriteAttribute("color-point-rintensity") - { - AddArgument("attr-name", "color-point-rintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlColorPointRIntensity() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000034) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeColorPointRIntensityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointRIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointRIntensity() - : SubscribeAttribute("color-point-rintensity") + SubscribeAttributeBallastConfigurationLampQuantity() + : SubscribeAttribute("lamp-quantity") { } - ~SubscribeAttributeColorControlColorPointRIntensity() {} + ~SubscribeAttributeBallastConfigurationLampQuantity() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59175,12 +68011,12 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointRIntensityWithParams:params + [cluster subscribeAttributeLampQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointRIntensity response %@", [value description]); + NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59189,29 +68025,29 @@ class SubscribeAttributeColorControlColorPointRIntensity : public SubscribeAttri }; /* - * Attribute ColorPointGX + * Attribute LampType */ -class ReadColorControlColorPointGX : public ReadAttribute { +class ReadBallastConfigurationLampType : public ReadAttribute { public: - ReadColorControlColorPointGX() - : ReadAttribute("color-point-gx") + ReadBallastConfigurationLampType() + : ReadAttribute("lamp-type") { } - ~ReadColorControlColorPointGX() {} + ~ReadBallastConfigurationLampType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000036) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointGX read Error", error); + LogNSError("BallastConfiguration LampType read Error", error); } SetCommandExitStatus(error); }]; @@ -59219,62 +68055,64 @@ class ReadColorControlColorPointGX : public ReadAttribute { } }; -class WriteColorControlColorPointGX : public WriteAttribute { +class WriteBallastConfigurationLampType : public WriteAttribute { public: - WriteColorControlColorPointGX() - : WriteAttribute("color-point-gx") + WriteBallastConfigurationLampType() + : WriteAttribute("lamp-type") { - AddArgument("attr-name", "color-point-gx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "lamp-type"); + AddArgument("attr-value", &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointGX() {} + ~WriteBallastConfigurationLampType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000036) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; - [cluster writeAttributeColorPointGXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGX write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLampTypeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampType write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + chip::ByteSpan mValue; }; -class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointGX() - : SubscribeAttribute("color-point-gx") + SubscribeAttributeBallastConfigurationLampType() + : SubscribeAttribute("lamp-type") { } - ~SubscribeAttributeColorControlColorPointGX() {} + ~SubscribeAttributeBallastConfigurationLampType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000036) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59285,12 +68123,12 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointGXWithParams:params + [cluster subscribeAttributeLampTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGX response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59299,29 +68137,29 @@ class SubscribeAttributeColorControlColorPointGX : public SubscribeAttribute { }; /* - * Attribute ColorPointGY + * Attribute LampManufacturer */ -class ReadColorControlColorPointGY : public ReadAttribute { +class ReadBallastConfigurationLampManufacturer : public ReadAttribute { public: - ReadColorControlColorPointGY() - : ReadAttribute("color-point-gy") + ReadBallastConfigurationLampManufacturer() + : ReadAttribute("lamp-manufacturer") { } - ~ReadColorControlColorPointGY() {} + ~ReadBallastConfigurationLampManufacturer() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000037) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointGY read Error", error); + LogNSError("BallastConfiguration LampManufacturer read Error", error); } SetCommandExitStatus(error); }]; @@ -59329,62 +68167,64 @@ class ReadColorControlColorPointGY : public ReadAttribute { } }; -class WriteColorControlColorPointGY : public WriteAttribute { +class WriteBallastConfigurationLampManufacturer : public WriteAttribute { public: - WriteColorControlColorPointGY() - : WriteAttribute("color-point-gy") + WriteBallastConfigurationLampManufacturer() + : WriteAttribute("lamp-manufacturer") { - AddArgument("attr-name", "color-point-gy"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "lamp-manufacturer"); + AddArgument("attr-value", &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointGY() {} + ~WriteBallastConfigurationLampManufacturer() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000037) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() + length:mValue.size() + encoding:NSUTF8StringEncoding]; - [cluster writeAttributeColorPointGYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGY write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLampManufacturerWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampManufacturer write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + chip::ByteSpan mValue; }; -class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointGY() - : SubscribeAttribute("color-point-gy") + SubscribeAttributeBallastConfigurationLampManufacturer() + : SubscribeAttribute("lamp-manufacturer") { } - ~SubscribeAttributeColorControlColorPointGY() {} + ~SubscribeAttributeBallastConfigurationLampManufacturer() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000037) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59395,12 +68235,12 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointGYWithParams:params + [cluster subscribeAttributeLampManufacturerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGY response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59409,29 +68249,29 @@ class SubscribeAttributeColorControlColorPointGY : public SubscribeAttribute { }; /* - * Attribute ColorPointGIntensity + * Attribute LampRatedHours */ -class ReadColorControlColorPointGIntensity : public ReadAttribute { +class ReadBallastConfigurationLampRatedHours : public ReadAttribute { public: - ReadColorControlColorPointGIntensity() - : ReadAttribute("color-point-gintensity") + ReadBallastConfigurationLampRatedHours() + : ReadAttribute("lamp-rated-hours") { } - ~ReadColorControlColorPointGIntensity() {} + ~ReadBallastConfigurationLampRatedHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00000038) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointGIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity read Error", error); + LogNSError("BallastConfiguration LampRatedHours read Error", error); } SetCommandExitStatus(error); }]; @@ -59439,62 +68279,62 @@ class ReadColorControlColorPointGIntensity : public ReadAttribute { } }; -class WriteColorControlColorPointGIntensity : public WriteAttribute { +class WriteBallastConfigurationLampRatedHours : public WriteAttribute { public: - WriteColorControlColorPointGIntensity() - : WriteAttribute("color-point-gintensity") + WriteBallastConfigurationLampRatedHours() + : WriteAttribute("lamp-rated-hours") { - AddArgument("attr-name", "color-point-gintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "lamp-rated-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointGIntensity() {} + ~WriteBallastConfigurationLampRatedHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00000038) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeColorPointGIntensityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointGIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLampRatedHoursWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampRatedHours write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint8_t mValue; + uint32_t mValue; }; -class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointGIntensity() - : SubscribeAttribute("color-point-gintensity") + SubscribeAttributeBallastConfigurationLampRatedHours() + : SubscribeAttribute("lamp-rated-hours") { } - ~SubscribeAttributeColorControlColorPointGIntensity() {} + ~SubscribeAttributeBallastConfigurationLampRatedHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00000038) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59505,12 +68345,12 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointGIntensityWithParams:params + [cluster subscribeAttributeLampRatedHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointGIntensity response %@", [value description]); + NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59519,29 +68359,29 @@ class SubscribeAttributeColorControlColorPointGIntensity : public SubscribeAttri }; /* - * Attribute ColorPointBX + * Attribute LampBurnHours */ -class ReadColorControlColorPointBX : public ReadAttribute { +class ReadBallastConfigurationLampBurnHours : public ReadAttribute { public: - ReadColorControlColorPointBX() - : ReadAttribute("color-point-bx") + ReadBallastConfigurationLampBurnHours() + : ReadAttribute("lamp-burn-hours") { } - ~ReadColorControlColorPointBX() {} + ~ReadBallastConfigurationLampBurnHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBXWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointBX read Error", error); + LogNSError("BallastConfiguration LampBurnHours read Error", error); } SetCommandExitStatus(error); }]; @@ -59549,62 +68389,62 @@ class ReadColorControlColorPointBX : public ReadAttribute { } }; -class WriteColorControlColorPointBX : public WriteAttribute { +class WriteBallastConfigurationLampBurnHours : public WriteAttribute { public: - WriteColorControlColorPointBX() - : WriteAttribute("color-point-bx") + WriteBallastConfigurationLampBurnHours() + : WriteAttribute("lamp-burn-hours") { - AddArgument("attr-name", "color-point-bx"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "lamp-burn-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBX() {} + ~WriteBallastConfigurationLampBurnHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeColorPointBXWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBX write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLampBurnHoursWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHours write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint32_t mValue; }; -class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBX() - : SubscribeAttribute("color-point-bx") + SubscribeAttributeBallastConfigurationLampBurnHours() + : SubscribeAttribute("lamp-burn-hours") { } - ~SubscribeAttributeColorControlColorPointBX() {} + ~SubscribeAttributeBallastConfigurationLampBurnHours() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000033) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59615,12 +68455,12 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBXWithParams:params + [cluster subscribeAttributeLampBurnHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBX response %@", [value description]); + NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59629,29 +68469,29 @@ class SubscribeAttributeColorControlColorPointBX : public SubscribeAttribute { }; /* - * Attribute ColorPointBY + * Attribute LampAlarmMode */ -class ReadColorControlColorPointBY : public ReadAttribute { +class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { public: - ReadColorControlColorPointBY() - : ReadAttribute("color-point-by") + ReadBallastConfigurationLampAlarmMode() + : ReadAttribute("lamp-alarm-mode") { } - ~ReadColorControlColorPointBY() {} + ~ReadBallastConfigurationLampAlarmMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBYWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointBY read Error", error); + LogNSError("BallastConfiguration LampAlarmMode read Error", error); } SetCommandExitStatus(error); }]; @@ -59659,62 +68499,62 @@ class ReadColorControlColorPointBY : public ReadAttribute { } }; -class WriteColorControlColorPointBY : public WriteAttribute { +class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { public: - WriteColorControlColorPointBY() - : WriteAttribute("color-point-by") + WriteBallastConfigurationLampAlarmMode() + : WriteAttribute("lamp-alarm-mode") { - AddArgument("attr-name", "color-point-by"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "lamp-alarm-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBY() {} + ~WriteBallastConfigurationLampAlarmMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeColorPointBYWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBY write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeLampAlarmModeWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampAlarmMode write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBY() - : SubscribeAttribute("color-point-by") + SubscribeAttributeBallastConfigurationLampAlarmMode() + : SubscribeAttribute("lamp-alarm-mode") { } - ~SubscribeAttributeColorControlColorPointBY() {} + ~SubscribeAttributeBallastConfigurationLampAlarmMode() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000034) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59725,12 +68565,12 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBYWithParams:params + [cluster subscribeAttributeLampAlarmModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBY response %@", [value description]); + NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59739,29 +68579,29 @@ class SubscribeAttributeColorControlColorPointBY : public SubscribeAttribute { }; /* - * Attribute ColorPointBIntensity + * Attribute LampBurnHoursTripPoint */ -class ReadColorControlColorPointBIntensity : public ReadAttribute { +class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { public: - ReadColorControlColorPointBIntensity() - : ReadAttribute("color-point-bintensity") + ReadBallastConfigurationLampBurnHoursTripPoint() + : ReadAttribute("lamp-burn-hours-trip-point") { } - ~ReadColorControlColorPointBIntensity() {} + ~ReadBallastConfigurationLampBurnHoursTripPoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000003C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorPointBIntensityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity read Error", error); + LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); } SetCommandExitStatus(error); }]; @@ -59769,62 +68609,63 @@ class ReadColorControlColorPointBIntensity : public ReadAttribute { } }; -class WriteColorControlColorPointBIntensity : public WriteAttribute { +class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { public: - WriteColorControlColorPointBIntensity() - : WriteAttribute("color-point-bintensity") + WriteBallastConfigurationLampBurnHoursTripPoint() + : WriteAttribute("lamp-burn-hours-trip-point") { - AddArgument("attr-name", "color-point-bintensity"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "lamp-burn-hours-trip-point"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteColorControlColorPointBIntensity() {} + ~WriteBallastConfigurationLampBurnHoursTripPoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x0000003C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - [cluster writeAttributeColorPointBIntensityWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ColorControl ColorPointBIntensity write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeLampBurnHoursTripPointWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint8_t mValue; + uint32_t mValue; }; -class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorPointBIntensity() - : SubscribeAttribute("color-point-bintensity") + SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() + : SubscribeAttribute("lamp-burn-hours-trip-point") { } - ~SubscribeAttributeColorControlColorPointBIntensity() {} + ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000003C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000035) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59835,12 +68676,12 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorPointBIntensityWithParams:params + [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorPointBIntensity response %@", [value description]); + NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59849,29 +68690,29 @@ class SubscribeAttributeColorControlColorPointBIntensity : public SubscribeAttri }; /* - * Attribute EnhancedCurrentHue + * Attribute GeneratedCommandList */ -class ReadColorControlEnhancedCurrentHue : public ReadAttribute { +class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadColorControlEnhancedCurrentHue() - : ReadAttribute("enhanced-current-hue") + ReadBallastConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadColorControlEnhancedCurrentHue() {} + ~ReadBallastConfigurationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnhancedCurrentHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl EnhancedCurrentHue read Error", error); + LogNSError("BallastConfiguration GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -59879,22 +68720,22 @@ class ReadColorControlEnhancedCurrentHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlEnhancedCurrentHue() - : SubscribeAttribute("enhanced-current-hue") + SubscribeAttributeBallastConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeColorControlEnhancedCurrentHue() {} + ~SubscribeAttributeBallastConfigurationGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59905,12 +68746,12 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnhancedCurrentHueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedCurrentHue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59919,29 +68760,29 @@ class SubscribeAttributeColorControlEnhancedCurrentHue : public SubscribeAttribu }; /* - * Attribute EnhancedColorMode + * Attribute AcceptedCommandList */ -class ReadColorControlEnhancedColorMode : public ReadAttribute { +class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadColorControlEnhancedColorMode() - : ReadAttribute("enhanced-color-mode") + ReadBallastConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadColorControlEnhancedColorMode() {} + ~ReadBallastConfigurationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEnhancedColorModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl EnhancedColorMode read Error", error); + LogNSError("BallastConfiguration AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -59949,22 +68790,22 @@ class ReadColorControlEnhancedColorMode : public ReadAttribute { } }; -class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlEnhancedColorMode() - : SubscribeAttribute("enhanced-color-mode") + SubscribeAttributeBallastConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeColorControlEnhancedColorMode() {} + ~SubscribeAttributeBallastConfigurationAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -59975,12 +68816,12 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEnhancedColorModeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.EnhancedColorMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -59989,29 +68830,29 @@ class SubscribeAttributeColorControlEnhancedColorMode : public SubscribeAttribut }; /* - * Attribute ColorLoopActive + * Attribute EventList */ -class ReadColorControlColorLoopActive : public ReadAttribute { +class ReadBallastConfigurationEventList : public ReadAttribute { public: - ReadColorControlColorLoopActive() - : ReadAttribute("color-loop-active") + ReadBallastConfigurationEventList() + : ReadAttribute("event-list") { } - ~ReadColorControlColorLoopActive() {} + ~ReadBallastConfigurationEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopActiveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.EventList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopActive read Error", error); + LogNSError("BallastConfiguration EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -60019,22 +68860,22 @@ class ReadColorControlColorLoopActive : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopActive() - : SubscribeAttribute("color-loop-active") + SubscribeAttributeBallastConfigurationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeColorControlColorLoopActive() {} + ~SubscribeAttributeBallastConfigurationEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60045,12 +68886,12 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopActiveWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopActive response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60059,29 +68900,29 @@ class SubscribeAttributeColorControlColorLoopActive : public SubscribeAttribute }; /* - * Attribute ColorLoopDirection + * Attribute AttributeList */ -class ReadColorControlColorLoopDirection : public ReadAttribute { +class ReadBallastConfigurationAttributeList : public ReadAttribute { public: - ReadColorControlColorLoopDirection() - : ReadAttribute("color-loop-direction") + ReadBallastConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadColorControlColorLoopDirection() {} + ~ReadBallastConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopDirectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopDirection read Error", error); + LogNSError("BallastConfiguration AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -60089,22 +68930,22 @@ class ReadColorControlColorLoopDirection : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopDirection() - : SubscribeAttribute("color-loop-direction") + SubscribeAttributeBallastConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeColorControlColorLoopDirection() {} + ~SubscribeAttributeBallastConfigurationAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60115,12 +68956,12 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopDirectionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopDirection response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60129,29 +68970,29 @@ class SubscribeAttributeColorControlColorLoopDirection : public SubscribeAttribu }; /* - * Attribute ColorLoopTime + * Attribute FeatureMap */ -class ReadColorControlColorLoopTime : public ReadAttribute { +class ReadBallastConfigurationFeatureMap : public ReadAttribute { public: - ReadColorControlColorLoopTime() - : ReadAttribute("color-loop-time") + ReadBallastConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadColorControlColorLoopTime() {} + ~ReadBallastConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopTime read Error", error); + LogNSError("BallastConfiguration FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -60159,22 +69000,22 @@ class ReadColorControlColorLoopTime : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopTime() - : SubscribeAttribute("color-loop-time") + SubscribeAttributeBallastConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeColorControlColorLoopTime() {} + ~SubscribeAttributeBallastConfigurationFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60185,12 +69026,12 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopTimeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopTime response %@", [value description]); + NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60199,29 +69040,29 @@ class SubscribeAttributeColorControlColorLoopTime : public SubscribeAttribute { }; /* - * Attribute ColorLoopStartEnhancedHue + * Attribute ClusterRevision */ -class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { +class ReadBallastConfigurationClusterRevision : public ReadAttribute { public: - ReadColorControlColorLoopStartEnhancedHue() - : ReadAttribute("color-loop-start-enhanced-hue") + ReadBallastConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadColorControlColorLoopStartEnhancedHue() {} + ~ReadBallastConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopStartEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopStartEnhancedHue read Error", error); + LogNSError("BallastConfiguration ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -60229,22 +69070,22 @@ class ReadColorControlColorLoopStartEnhancedHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public SubscribeAttribute { +class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopStartEnhancedHue() - : SubscribeAttribute("color-loop-start-enhanced-hue") + SubscribeAttributeBallastConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeColorControlColorLoopStartEnhancedHue() {} + ~SubscribeAttributeBallastConfigurationClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60255,12 +69096,12 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopStartEnhancedHueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStartEnhancedHue response %@", [value description]); + NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60268,30 +69109,51 @@ class SubscribeAttributeColorControlColorLoopStartEnhancedHue : public Subscribe } }; +/*----------------------------------------------------------------------------*\ +| Cluster IlluminanceMeasurement | 0x0400 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * LightSensorType | 0x0004 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute ColorLoopStoredEnhancedHue + * Attribute MeasuredValue */ -class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { +class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { public: - ReadColorControlColorLoopStoredEnhancedHue() - : ReadAttribute("color-loop-stored-enhanced-hue") + ReadIlluminanceMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadColorControlColorLoopStoredEnhancedHue() {} + ~ReadIlluminanceMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorLoopStoredEnhancedHueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorLoopStoredEnhancedHue read Error", error); + LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -60299,22 +69161,22 @@ class ReadColorControlColorLoopStoredEnhancedHue : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorLoopStoredEnhancedHue() - : SubscribeAttribute("color-loop-stored-enhanced-hue") + SubscribeAttributeIlluminanceMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeColorControlColorLoopStoredEnhancedHue() {} + ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60325,12 +69187,12 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorLoopStoredEnhancedHueWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorLoopStoredEnhancedHue response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60339,29 +69201,29 @@ class SubscribeAttributeColorControlColorLoopStoredEnhancedHue : public Subscrib }; /* - * Attribute ColorCapabilities + * Attribute MinMeasuredValue */ -class ReadColorControlColorCapabilities : public ReadAttribute { +class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadColorControlColorCapabilities() - : ReadAttribute("color-capabilities") + ReadIlluminanceMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadColorControlColorCapabilities() {} + ~ReadIlluminanceMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorCapabilitiesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorCapabilities read Error", error); + LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -60369,22 +69231,22 @@ class ReadColorControlColorCapabilities : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorCapabilities() - : SubscribeAttribute("color-capabilities") + SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeColorControlColorCapabilities() {} + ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60395,12 +69257,12 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorCapabilitiesWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorCapabilities response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60409,29 +69271,29 @@ class SubscribeAttributeColorControlColorCapabilities : public SubscribeAttribut }; /* - * Attribute ColorTempPhysicalMinMireds + * Attribute MaxMeasuredValue */ -class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { +class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadColorControlColorTempPhysicalMinMireds() - : ReadAttribute("color-temp-physical-min-mireds") + ReadIlluminanceMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadColorControlColorTempPhysicalMinMireds() {} + ~ReadIlluminanceMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorTempPhysicalMinMireds read Error", error); + LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -60439,22 +69301,22 @@ class ReadColorControlColorTempPhysicalMinMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorTempPhysicalMinMireds() - : SubscribeAttribute("color-temp-physical-min-mireds") + SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeColorControlColorTempPhysicalMinMireds() {} + ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60465,12 +69327,12 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTempPhysicalMinMiredsWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMinMireds response %@", [value description]); + NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60479,29 +69341,29 @@ class SubscribeAttributeColorControlColorTempPhysicalMinMireds : public Subscrib }; /* - * Attribute ColorTempPhysicalMaxMireds + * Attribute Tolerance */ -class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { +class ReadIlluminanceMeasurementTolerance : public ReadAttribute { public: - ReadColorControlColorTempPhysicalMaxMireds() - : ReadAttribute("color-temp-physical-max-mireds") + ReadIlluminanceMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadColorControlColorTempPhysicalMaxMireds() {} + ~ReadIlluminanceMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeColorTempPhysicalMaxMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ColorTempPhysicalMaxMireds read Error", error); + LogNSError("IlluminanceMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -60509,22 +69371,22 @@ class ReadColorControlColorTempPhysicalMaxMireds : public ReadAttribute { } }; -class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeColorControlColorTempPhysicalMaxMireds() - : SubscribeAttribute("color-temp-physical-max-mireds") + SubscribeAttributeIlluminanceMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeColorControlColorTempPhysicalMaxMireds() {} + ~SubscribeAttributeIlluminanceMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60535,12 +69397,12 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeColorTempPhysicalMaxMiredsWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ColorTempPhysicalMaxMireds response %@", [value description]); + NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60549,53 +69411,52 @@ class SubscribeAttributeColorControlColorTempPhysicalMaxMireds : public Subscrib }; /* - * Attribute CoupleColorTempToLevelMinMireds + * Attribute LightSensorType */ -class ReadColorControlCoupleColorTempToLevelMinMireds : public ReadAttribute { +class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { public: - ReadColorControlCoupleColorTempToLevelMinMireds() - : ReadAttribute("couple-color-temp-to-level-min-mireds") + ReadIlluminanceMeasurementLightSensorType() + : ReadAttribute("light-sensor-type") { } - ~ReadColorControlCoupleColorTempToLevelMinMireds() {} + ~ReadIlluminanceMeasurementLightSensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000400D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeCoupleColorTempToLevelMinMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); - if (error != nil) { - LogNSError("ColorControl CoupleColorTempToLevelMinMireds read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + if (error != nil) { + LogNSError("IlluminanceMeasurement LightSensorType read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { public: - SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() - : SubscribeAttribute("couple-color-temp-to-level-min-mireds") + SubscribeAttributeIlluminanceMeasurementLightSensorType() + : SubscribeAttribute("light-sensor-type") { } - ~SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds() {} + ~SubscribeAttributeIlluminanceMeasurementLightSensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000400D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60606,12 +69467,12 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCoupleColorTempToLevelMinMiredsWithParams:params + [cluster subscribeAttributeLightSensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.CoupleColorTempToLevelMinMireds response %@", [value description]); + NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60620,29 +69481,29 @@ class SubscribeAttributeColorControlCoupleColorTempToLevelMinMireds : public Sub }; /* - * Attribute StartUpColorTemperatureMireds + * Attribute GeneratedCommandList */ -class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { +class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadColorControlStartUpColorTemperatureMireds() - : ReadAttribute("start-up-color-temperature-mireds") + ReadIlluminanceMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadColorControlStartUpColorTemperatureMireds() {} + ~ReadIlluminanceMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x00004010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartUpColorTemperatureMiredsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl StartUpColorTemperatureMireds read Error", error); + LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -60650,64 +69511,22 @@ class ReadColorControlStartUpColorTemperatureMireds : public ReadAttribute { } }; -class WriteColorControlStartUpColorTemperatureMireds : public WriteAttribute { -public: - WriteColorControlStartUpColorTemperatureMireds() - : WriteAttribute("start-up-color-temperature-mireds") - { - AddArgument("attr-name", "start-up-color-temperature-mireds"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteColorControlStartUpColorTemperatureMireds() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) WriteAttribute (0x00004010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeStartUpColorTemperatureMiredsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ColorControl StartUpColorTemperatureMireds write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlStartUpColorTemperatureMireds() - : SubscribeAttribute("start-up-color-temperature-mireds") + SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeColorControlStartUpColorTemperatureMireds() {} + ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x00004010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60718,12 +69537,12 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpColorTemperatureMiredsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.StartUpColorTemperatureMireds response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60732,29 +69551,29 @@ class SubscribeAttributeColorControlStartUpColorTemperatureMireds : public Subsc }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadColorControlGeneratedCommandList : public ReadAttribute { +class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadColorControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadIlluminanceMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadColorControlGeneratedCommandList() {} + ~ReadIlluminanceMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl GeneratedCommandList read Error", error); + LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -60762,22 +69581,22 @@ class ReadColorControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeColorControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeColorControlGeneratedCommandList() {} + ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60788,12 +69607,12 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.GeneratedCommandList response %@", [value description]); + NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60802,29 +69621,29 @@ class SubscribeAttributeColorControlGeneratedCommandList : public SubscribeAttri }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadColorControlAcceptedCommandList : public ReadAttribute { +class ReadIlluminanceMeasurementEventList : public ReadAttribute { public: - ReadColorControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadIlluminanceMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadColorControlAcceptedCommandList() {} + ~ReadIlluminanceMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl AcceptedCommandList read Error", error); + LogNSError("IlluminanceMeasurement EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -60832,22 +69651,22 @@ class ReadColorControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeColorControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeIlluminanceMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeColorControlAcceptedCommandList() {} + ~SubscribeAttributeIlluminanceMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60858,12 +69677,12 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AcceptedCommandList response %@", [value description]); + NSLog(@"IlluminanceMeasurement.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60874,27 +69693,27 @@ class SubscribeAttributeColorControlAcceptedCommandList : public SubscribeAttrib /* * Attribute AttributeList */ -class ReadColorControlAttributeList : public ReadAttribute { +class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { public: - ReadColorControlAttributeList() + ReadIlluminanceMeasurementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadColorControlAttributeList() {} + ~ReadIlluminanceMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ColorControl AttributeList read Error", error); + LogNSError("IlluminanceMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -60902,22 +69721,22 @@ class ReadColorControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeColorControlAttributeList() + SubscribeAttributeIlluminanceMeasurementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeColorControlAttributeList() {} + ~SubscribeAttributeIlluminanceMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60933,7 +69752,7 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.AttributeList response %@", [value description]); + NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -60944,27 +69763,27 @@ class SubscribeAttributeColorControlAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadColorControlFeatureMap : public ReadAttribute { +class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { public: - ReadColorControlFeatureMap() + ReadIlluminanceMeasurementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadColorControlFeatureMap() {} + ~ReadIlluminanceMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ColorControl FeatureMap read Error", error); + LogNSError("IlluminanceMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -60972,22 +69791,22 @@ class ReadColorControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeColorControlFeatureMap() + SubscribeAttributeIlluminanceMeasurementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeColorControlFeatureMap() {} + ~SubscribeAttributeIlluminanceMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61003,7 +69822,7 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.FeatureMap response %@", [value description]); + NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61014,27 +69833,27 @@ class SubscribeAttributeColorControlFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadColorControlClusterRevision : public ReadAttribute { +class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { public: - ReadColorControlClusterRevision() + ReadIlluminanceMeasurementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadColorControlClusterRevision() {} + ~ReadIlluminanceMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ColorControl ClusterRevision read Error", error); + LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -61042,22 +69861,22 @@ class ReadColorControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeColorControlClusterRevision() + SubscribeAttributeIlluminanceMeasurementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeColorControlClusterRevision() {} + ~SubscribeAttributeIlluminanceMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000300) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterColorControl alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61073,7 +69892,7 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ColorControl.ClusterRevision response %@", [value description]); + NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61082,25 +69901,15 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute }; /*----------------------------------------------------------------------------*\ -| Cluster BallastConfiguration | 0x0301 | +| Cluster TemperatureMeasurement | 0x0402 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * PhysicalMinLevel | 0x0000 | -| * PhysicalMaxLevel | 0x0001 | -| * BallastStatus | 0x0002 | -| * MinLevel | 0x0010 | -| * MaxLevel | 0x0011 | -| * IntrinsicBallastFactor | 0x0014 | -| * BallastFactorAdjustment | 0x0015 | -| * LampQuantity | 0x0020 | -| * LampType | 0x0030 | -| * LampManufacturer | 0x0031 | -| * LampRatedHours | 0x0032 | -| * LampBurnHours | 0x0033 | -| * LampAlarmMode | 0x0034 | -| * LampBurnHoursTripPoint | 0x0035 | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -61112,29 +69921,29 @@ class SubscribeAttributeColorControlClusterRevision : public SubscribeAttribute \*----------------------------------------------------------------------------*/ /* - * Attribute PhysicalMinLevel + * Attribute MeasuredValue */ -class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { +class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationPhysicalMinLevel() - : ReadAttribute("physical-min-level") + ReadTemperatureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadBallastConfigurationPhysicalMinLevel() {} + ~ReadTemperatureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration PhysicalMinLevel read Error", error); + LogNSError("TemperatureMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -61142,22 +69951,22 @@ class ReadBallastConfigurationPhysicalMinLevel : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationPhysicalMinLevel() - : SubscribeAttribute("physical-min-level") + SubscribeAttributeTemperatureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeBallastConfigurationPhysicalMinLevel() {} + ~SubscribeAttributeTemperatureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61168,12 +69977,12 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalMinLevelWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMinLevel response %@", [value description]); + NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61182,29 +69991,29 @@ class SubscribeAttributeBallastConfigurationPhysicalMinLevel : public SubscribeA }; /* - * Attribute PhysicalMaxLevel + * Attribute MinMeasuredValue */ -class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { +class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationPhysicalMaxLevel() - : ReadAttribute("physical-max-level") + ReadTemperatureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadBallastConfigurationPhysicalMaxLevel() {} + ~ReadTemperatureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration PhysicalMaxLevel read Error", error); + LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -61212,22 +70021,22 @@ class ReadBallastConfigurationPhysicalMaxLevel : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationPhysicalMaxLevel() - : SubscribeAttribute("physical-max-level") + SubscribeAttributeTemperatureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeBallastConfigurationPhysicalMaxLevel() {} + ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61238,12 +70047,12 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalMaxLevelWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.PhysicalMaxLevel response %@", [value description]); + NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61252,29 +70061,29 @@ class SubscribeAttributeBallastConfigurationPhysicalMaxLevel : public SubscribeA }; /* - * Attribute BallastStatus + * Attribute MaxMeasuredValue */ -class ReadBallastConfigurationBallastStatus : public ReadAttribute { +class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationBallastStatus() - : ReadAttribute("ballast-status") + ReadTemperatureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadBallastConfigurationBallastStatus() {} + ~ReadTemperatureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBallastStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration BallastStatus read Error", error); + LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -61282,22 +70091,22 @@ class ReadBallastConfigurationBallastStatus : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationBallastStatus() - : SubscribeAttribute("ballast-status") + SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeBallastConfigurationBallastStatus() {} + ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61308,12 +70117,12 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBallastStatusWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastStatus response %@", [value description]); + NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61322,29 +70131,29 @@ class SubscribeAttributeBallastConfigurationBallastStatus : public SubscribeAttr }; /* - * Attribute MinLevel + * Attribute Tolerance */ -class ReadBallastConfigurationMinLevel : public ReadAttribute { +class ReadTemperatureMeasurementTolerance : public ReadAttribute { public: - ReadBallastConfigurationMinLevel() - : ReadAttribute("min-level") + ReadTemperatureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadBallastConfigurationMinLevel() {} + ~ReadTemperatureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration MinLevel read Error", error); + LogNSError("TemperatureMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -61352,62 +70161,22 @@ class ReadBallastConfigurationMinLevel : public ReadAttribute { } }; -class WriteBallastConfigurationMinLevel : public WriteAttribute { -public: - WriteBallastConfigurationMinLevel() - : WriteAttribute("min-level") - { - AddArgument("attr-name", "min-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationMinLevel() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeMinLevelWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MinLevel write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationMinLevel() - : SubscribeAttribute("min-level") + SubscribeAttributeTemperatureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeBallastConfigurationMinLevel() {} + ~SubscribeAttributeTemperatureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61418,12 +70187,12 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinLevelWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MinLevel response %@", [value description]); + NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61432,29 +70201,29 @@ class SubscribeAttributeBallastConfigurationMinLevel : public SubscribeAttribute }; /* - * Attribute MaxLevel + * Attribute GeneratedCommandList */ -class ReadBallastConfigurationMaxLevel : public ReadAttribute { +class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadBallastConfigurationMaxLevel() - : ReadAttribute("max-level") + ReadTemperatureMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBallastConfigurationMaxLevel() {} + ~ReadTemperatureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration MaxLevel read Error", error); + LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -61462,62 +70231,92 @@ class ReadBallastConfigurationMaxLevel : public ReadAttribute { } }; -class WriteBallastConfigurationMaxLevel : public WriteAttribute { +class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - WriteBallastConfigurationMaxLevel() - : WriteAttribute("max-level") + SubscribeAttributeTemperatureMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { - AddArgument("attr-name", "max-level"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteBallastConfigurationMaxLevel() {} + ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster writeAttributeMaxLevelWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration MaxLevel write Error", error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; -private: - uint8_t mValue; +/* + * Attribute AcceptedCommandList + */ +class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { +public: + ReadTemperatureMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadTemperatureMeasurementAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationMaxLevel() - : SubscribeAttribute("max-level") + SubscribeAttributeTemperatureMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBallastConfigurationMaxLevel() {} + ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61528,12 +70327,12 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxLevelWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.MaxLevel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61542,29 +70341,29 @@ class SubscribeAttributeBallastConfigurationMaxLevel : public SubscribeAttribute }; /* - * Attribute IntrinsicBallastFactor + * Attribute EventList */ -class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { +class ReadTemperatureMeasurementEventList : public ReadAttribute { public: - ReadBallastConfigurationIntrinsicBallastFactor() - : ReadAttribute("intrinsic-ballast-factor") + ReadTemperatureMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadBallastConfigurationIntrinsicBallastFactor() {} + ~ReadTemperatureMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeIntrinsicBallastFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBallastFactor read Error", error); + LogNSError("TemperatureMeasurement EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -61572,63 +70371,92 @@ class ReadBallastConfigurationIntrinsicBallastFactor : public ReadAttribute { } }; -class WriteBallastConfigurationIntrinsicBallastFactor : public WriteAttribute { +class SubscribeAttributeTemperatureMeasurementEventList : public SubscribeAttribute { public: - WriteBallastConfigurationIntrinsicBallastFactor() - : WriteAttribute("intrinsic-ballast-factor") + SubscribeAttributeTemperatureMeasurementEventList() + : SubscribeAttribute("event-list") { - AddArgument("attr-name", "intrinsic-ballast-factor"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteBallastConfigurationIntrinsicBallastFactor() {} + ~SubscribeAttributeTemperatureMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster - writeAttributeIntrinsicBallastFactorWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration IntrinsicBallastFactor write Error", error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public SubscribeAttribute { +/* + * Attribute AttributeList + */ +class ReadTemperatureMeasurementAttributeList : public ReadAttribute { +public: + ReadTemperatureMeasurementAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadTemperatureMeasurementAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("TemperatureMeasurement AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() - : SubscribeAttribute("intrinsic-ballast-factor") + SubscribeAttributeTemperatureMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBallastConfigurationIntrinsicBallastFactor() {} + ~SubscribeAttributeTemperatureMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61639,12 +70467,12 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeIntrinsicBallastFactorWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.IntrinsicBallastFactor response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61653,29 +70481,29 @@ class SubscribeAttributeBallastConfigurationIntrinsicBallastFactor : public Subs }; /* - * Attribute BallastFactorAdjustment + * Attribute FeatureMap */ -class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { +class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { public: - ReadBallastConfigurationBallastFactorAdjustment() - : ReadAttribute("ballast-factor-adjustment") + ReadTemperatureMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBallastConfigurationBallastFactorAdjustment() {} + ~ReadTemperatureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeBallastFactorAdjustmentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration BallastFactorAdjustment read Error", error); + LogNSError("TemperatureMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -61683,63 +70511,22 @@ class ReadBallastConfigurationBallastFactorAdjustment : public ReadAttribute { } }; -class WriteBallastConfigurationBallastFactorAdjustment : public WriteAttribute { -public: - WriteBallastConfigurationBallastFactorAdjustment() - : WriteAttribute("ballast-factor-adjustment") - { - AddArgument("attr-name", "ballast-factor-adjustment"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationBallastFactorAdjustment() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000015) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeBallastFactorAdjustmentWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "BallastConfiguration BallastFactorAdjustment write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationBallastFactorAdjustment() - : SubscribeAttribute("ballast-factor-adjustment") + SubscribeAttributeTemperatureMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBallastConfigurationBallastFactorAdjustment() {} + ~SubscribeAttributeTemperatureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000015) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61750,12 +70537,12 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBallastFactorAdjustmentWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.BallastFactorAdjustment response %@", [value description]); + NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61764,29 +70551,29 @@ class SubscribeAttributeBallastConfigurationBallastFactorAdjustment : public Sub }; /* - * Attribute LampQuantity + * Attribute ClusterRevision */ -class ReadBallastConfigurationLampQuantity : public ReadAttribute { +class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { public: - ReadBallastConfigurationLampQuantity() - : ReadAttribute("lamp-quantity") + ReadTemperatureMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBallastConfigurationLampQuantity() {} + ~ReadTemperatureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampQuantity read Error", error); + LogNSError("TemperatureMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -61794,22 +70581,22 @@ class ReadBallastConfigurationLampQuantity : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttribute { +class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampQuantity() - : SubscribeAttribute("lamp-quantity") + SubscribeAttributeTemperatureMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBallastConfigurationLampQuantity() {} + ~SubscribeAttributeTemperatureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61820,12 +70607,12 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampQuantityWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampQuantity response %@", [value description]); + NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61833,30 +70620,55 @@ class SubscribeAttributeBallastConfigurationLampQuantity : public SubscribeAttri } }; +/*----------------------------------------------------------------------------*\ +| Cluster PressureMeasurement | 0x0403 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * ScaledValue | 0x0010 | +| * MinScaledValue | 0x0011 | +| * MaxScaledValue | 0x0012 | +| * ScaledTolerance | 0x0013 | +| * Scale | 0x0014 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute LampType + * Attribute MeasuredValue */ -class ReadBallastConfigurationLampType : public ReadAttribute { +class ReadPressureMeasurementMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationLampType() - : ReadAttribute("lamp-type") + ReadPressureMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadBallastConfigurationLampType() {} + ~ReadPressureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampTypeWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampType read Error", error); + LogNSError("PressureMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -61864,64 +70676,22 @@ class ReadBallastConfigurationLampType : public ReadAttribute { } }; -class WriteBallastConfigurationLampType : public WriteAttribute { -public: - WriteBallastConfigurationLampType() - : WriteAttribute("lamp-type") - { - AddArgument("attr-name", "lamp-type"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampType() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLampTypeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampType write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampType() - : SubscribeAttribute("lamp-type") + SubscribeAttributePressureMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeBallastConfigurationLampType() {} + ~SubscribeAttributePressureMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -61932,12 +70702,12 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampTypeWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampType response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -61946,29 +70716,29 @@ class SubscribeAttributeBallastConfigurationLampType : public SubscribeAttribute }; /* - * Attribute LampManufacturer + * Attribute MinMeasuredValue */ -class ReadBallastConfigurationLampManufacturer : public ReadAttribute { +class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationLampManufacturer() - : ReadAttribute("lamp-manufacturer") + ReadPressureMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadBallastConfigurationLampManufacturer() {} + ~ReadPressureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampManufacturerWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer read Error", error); + LogNSError("PressureMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -61976,64 +70746,22 @@ class ReadBallastConfigurationLampManufacturer : public ReadAttribute { } }; -class WriteBallastConfigurationLampManufacturer : public WriteAttribute { -public: - WriteBallastConfigurationLampManufacturer() - : WriteAttribute("lamp-manufacturer") - { - AddArgument("attr-name", "lamp-manufacturer"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampManufacturer() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() - length:mValue.size() - encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLampManufacturerWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampManufacturer write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - chip::ByteSpan mValue; -}; - -class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampManufacturer() - : SubscribeAttribute("lamp-manufacturer") + SubscribeAttributePressureMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeBallastConfigurationLampManufacturer() {} + ~SubscribeAttributePressureMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62044,12 +70772,12 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampManufacturerWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampManufacturer response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62058,29 +70786,29 @@ class SubscribeAttributeBallastConfigurationLampManufacturer : public SubscribeA }; /* - * Attribute LampRatedHours + * Attribute MaxMeasuredValue */ -class ReadBallastConfigurationLampRatedHours : public ReadAttribute { +class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadBallastConfigurationLampRatedHours() - : ReadAttribute("lamp-rated-hours") + ReadPressureMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadBallastConfigurationLampRatedHours() {} + ~ReadPressureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampRatedHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours read Error", error); + LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -62088,62 +70816,22 @@ class ReadBallastConfigurationLampRatedHours : public ReadAttribute { } }; -class WriteBallastConfigurationLampRatedHours : public WriteAttribute { -public: - WriteBallastConfigurationLampRatedHours() - : WriteAttribute("lamp-rated-hours") - { - AddArgument("attr-name", "lamp-rated-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampRatedHours() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000032) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeLampRatedHoursWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampRatedHours write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampRatedHours() - : SubscribeAttribute("lamp-rated-hours") + SubscribeAttributePressureMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeBallastConfigurationLampRatedHours() {} + ~SubscribeAttributePressureMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62154,12 +70842,12 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampRatedHoursWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampRatedHours response %@", [value description]); + NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62168,29 +70856,29 @@ class SubscribeAttributeBallastConfigurationLampRatedHours : public SubscribeAtt }; /* - * Attribute LampBurnHours + * Attribute Tolerance */ -class ReadBallastConfigurationLampBurnHours : public ReadAttribute { +class ReadPressureMeasurementTolerance : public ReadAttribute { public: - ReadBallastConfigurationLampBurnHours() - : ReadAttribute("lamp-burn-hours") + ReadPressureMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadBallastConfigurationLampBurnHours() {} + ~ReadPressureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampBurnHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours read Error", error); + LogNSError("PressureMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -62198,62 +70886,22 @@ class ReadBallastConfigurationLampBurnHours : public ReadAttribute { } }; -class WriteBallastConfigurationLampBurnHours : public WriteAttribute { -public: - WriteBallastConfigurationLampBurnHours() - : WriteAttribute("lamp-burn-hours") - { - AddArgument("attr-name", "lamp-burn-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHours() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000033) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster writeAttributeLampBurnHoursWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHours write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttribute { -public: - SubscribeAttributeBallastConfigurationLampBurnHours() - : SubscribeAttribute("lamp-burn-hours") +class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { +public: + SubscribeAttributePressureMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeBallastConfigurationLampBurnHours() {} + ~SubscribeAttributePressureMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000033) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62264,12 +70912,12 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampBurnHoursWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHours response %@", [value description]); + NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62278,29 +70926,29 @@ class SubscribeAttributeBallastConfigurationLampBurnHours : public SubscribeAttr }; /* - * Attribute LampAlarmMode + * Attribute ScaledValue */ -class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { +class ReadPressureMeasurementScaledValue : public ReadAttribute { public: - ReadBallastConfigurationLampAlarmMode() - : ReadAttribute("lamp-alarm-mode") + ReadPressureMeasurementScaledValue() + : ReadAttribute("scaled-value") { } - ~ReadBallastConfigurationLampAlarmMode() {} + ~ReadPressureMeasurementScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampAlarmModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode read Error", error); + LogNSError("PressureMeasurement ScaledValue read Error", error); } SetCommandExitStatus(error); }]; @@ -62308,62 +70956,22 @@ class ReadBallastConfigurationLampAlarmMode : public ReadAttribute { } }; -class WriteBallastConfigurationLampAlarmMode : public WriteAttribute { -public: - WriteBallastConfigurationLampAlarmMode() - : WriteAttribute("lamp-alarm-mode") - { - AddArgument("attr-name", "lamp-alarm-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampAlarmMode() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000034) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeLampAlarmModeWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampAlarmMode write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampAlarmMode() - : SubscribeAttribute("lamp-alarm-mode") + SubscribeAttributePressureMeasurementScaledValue() + : SubscribeAttribute("scaled-value") { } - ~SubscribeAttributeBallastConfigurationLampAlarmMode() {} + ~SubscribeAttributePressureMeasurementScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000034) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62374,12 +70982,12 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampAlarmModeWithParams:params + [cluster subscribeAttributeScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampAlarmMode response %@", [value description]); + NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62388,29 +70996,29 @@ class SubscribeAttributeBallastConfigurationLampAlarmMode : public SubscribeAttr }; /* - * Attribute LampBurnHoursTripPoint + * Attribute MinScaledValue */ -class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { +class ReadPressureMeasurementMinScaledValue : public ReadAttribute { public: - ReadBallastConfigurationLampBurnHoursTripPoint() - : ReadAttribute("lamp-burn-hours-trip-point") + ReadPressureMeasurementMinScaledValue() + : ReadAttribute("min-scaled-value") { } - ~ReadBallastConfigurationLampBurnHoursTripPoint() {} + ~ReadPressureMeasurementMinScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLampBurnHoursTripPointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint read Error", error); + LogNSError("PressureMeasurement MinScaledValue read Error", error); } SetCommandExitStatus(error); }]; @@ -62418,63 +71026,22 @@ class ReadBallastConfigurationLampBurnHoursTripPoint : public ReadAttribute { } }; -class WriteBallastConfigurationLampBurnHoursTripPoint : public WriteAttribute { -public: - WriteBallastConfigurationLampBurnHoursTripPoint() - : WriteAttribute("lamp-burn-hours-trip-point") - { - AddArgument("attr-name", "lamp-burn-hours-trip-point"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBallastConfigurationLampBurnHoursTripPoint() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) WriteAttribute (0x00000035) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nullable value = [NSNumber numberWithUnsignedInt:mValue]; - - [cluster - writeAttributeLampBurnHoursTripPointWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BallastConfiguration LampBurnHoursTripPoint write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint32_t mValue; -}; - -class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() - : SubscribeAttribute("lamp-burn-hours-trip-point") + SubscribeAttributePressureMeasurementMinScaledValue() + : SubscribeAttribute("min-scaled-value") { } - ~SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint() {} + ~SubscribeAttributePressureMeasurementMinScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x00000035) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62485,12 +71052,12 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLampBurnHoursTripPointWithParams:params + [cluster subscribeAttributeMinScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.LampBurnHoursTripPoint response %@", [value description]); + NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62499,29 +71066,29 @@ class SubscribeAttributeBallastConfigurationLampBurnHoursTripPoint : public Subs }; /* - * Attribute GeneratedCommandList + * Attribute MaxScaledValue */ -class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { +class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { public: - ReadBallastConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPressureMeasurementMaxScaledValue() + : ReadAttribute("max-scaled-value") { } - ~ReadBallastConfigurationGeneratedCommandList() {} + ~ReadPressureMeasurementMaxScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration GeneratedCommandList read Error", error); + LogNSError("PressureMeasurement MaxScaledValue read Error", error); } SetCommandExitStatus(error); }]; @@ -62529,22 +71096,22 @@ class ReadBallastConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePressureMeasurementMaxScaledValue() + : SubscribeAttribute("max-scaled-value") { } - ~SubscribeAttributeBallastConfigurationGeneratedCommandList() {} + ~SubscribeAttributePressureMeasurementMaxScaledValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62555,12 +71122,12 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMaxScaledValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62569,29 +71136,29 @@ class SubscribeAttributeBallastConfigurationGeneratedCommandList : public Subscr }; /* - * Attribute AcceptedCommandList + * Attribute ScaledTolerance */ -class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { +class ReadPressureMeasurementScaledTolerance : public ReadAttribute { public: - ReadBallastConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPressureMeasurementScaledTolerance() + : ReadAttribute("scaled-tolerance") { } - ~ReadBallastConfigurationAcceptedCommandList() {} + ~ReadPressureMeasurementScaledTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration AcceptedCommandList read Error", error); + LogNSError("PressureMeasurement ScaledTolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -62599,22 +71166,22 @@ class ReadBallastConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePressureMeasurementScaledTolerance() + : SubscribeAttribute("scaled-tolerance") { } - ~SubscribeAttributeBallastConfigurationAcceptedCommandList() {} + ~SubscribeAttributePressureMeasurementScaledTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000013) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62625,12 +71192,12 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeScaledToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62639,29 +71206,29 @@ class SubscribeAttributeBallastConfigurationAcceptedCommandList : public Subscri }; /* - * Attribute AttributeList + * Attribute Scale */ -class ReadBallastConfigurationAttributeList : public ReadAttribute { +class ReadPressureMeasurementScale : public ReadAttribute { public: - ReadBallastConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadPressureMeasurementScale() + : ReadAttribute("scale") { } - ~ReadBallastConfigurationAttributeList() {} + ~ReadPressureMeasurementScale() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration AttributeList read Error", error); + LogNSError("PressureMeasurement Scale read Error", error); } SetCommandExitStatus(error); }]; @@ -62669,22 +71236,22 @@ class ReadBallastConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePressureMeasurementScale() + : SubscribeAttribute("scale") { } - ~SubscribeAttributeBallastConfigurationAttributeList() {} + ~SubscribeAttributePressureMeasurementScale() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000014) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62695,12 +71262,12 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeScaleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.Scale response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62709,29 +71276,29 @@ class SubscribeAttributeBallastConfigurationAttributeList : public SubscribeAttr }; /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadBallastConfigurationFeatureMap : public ReadAttribute { +class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadBallastConfigurationFeatureMap() - : ReadAttribute("feature-map") + ReadPressureMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBallastConfigurationFeatureMap() {} + ~ReadPressureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration FeatureMap read Error", error); + LogNSError("PressureMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -62739,22 +71306,22 @@ class ReadBallastConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePressureMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBallastConfigurationFeatureMap() {} + ~SubscribeAttributePressureMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62765,12 +71332,12 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62779,29 +71346,29 @@ class SubscribeAttributeBallastConfigurationFeatureMap : public SubscribeAttribu }; /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadBallastConfigurationClusterRevision : public ReadAttribute { +class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadBallastConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPressureMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBallastConfigurationClusterRevision() {} + ~ReadPressureMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("BallastConfiguration ClusterRevision read Error", error); + LogNSError("PressureMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -62809,22 +71376,22 @@ class ReadBallastConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBallastConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePressureMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBallastConfigurationClusterRevision() {} + ~SubscribeAttributePressureMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000301) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBallastConfiguration alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62835,12 +71402,12 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BallastConfiguration.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62848,51 +71415,30 @@ class SubscribeAttributeBallastConfigurationClusterRevision : public SubscribeAt } }; -/*----------------------------------------------------------------------------*\ -| Cluster IlluminanceMeasurement | 0x0400 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * LightSensorType | 0x0004 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute EventList */ -class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementEventList : public ReadAttribute { public: - ReadIlluminanceMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadPressureMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadIlluminanceMeasurementMeasuredValue() {} + ~ReadPressureMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.EventList response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement MeasuredValue read Error", error); + LogNSError("PressureMeasurement EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -62900,22 +71446,22 @@ class ReadIlluminanceMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributePressureMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeIlluminanceMeasurementMeasuredValue() {} + ~SubscribeAttributePressureMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62926,12 +71472,12 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -62940,29 +71486,29 @@ class SubscribeAttributeIlluminanceMeasurementMeasuredValue : public SubscribeAt }; /* - * Attribute MinMeasuredValue + * Attribute AttributeList */ -class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementAttributeList : public ReadAttribute { public: - ReadIlluminanceMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadPressureMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadIlluminanceMeasurementMinMeasuredValue() {} + ~ReadPressureMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement MinMeasuredValue read Error", error); + LogNSError("PressureMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -62970,22 +71516,22 @@ class ReadIlluminanceMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributePressureMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeIlluminanceMeasurementMinMeasuredValue() {} + ~SubscribeAttributePressureMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62996,12 +71542,12 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MinMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63010,29 +71556,29 @@ class SubscribeAttributeIlluminanceMeasurementMinMeasuredValue : public Subscrib }; /* - * Attribute MaxMeasuredValue + * Attribute FeatureMap */ -class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadPressureMeasurementFeatureMap : public ReadAttribute { public: - ReadIlluminanceMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadPressureMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadIlluminanceMeasurementMaxMeasuredValue() {} + ~ReadPressureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement MaxMeasuredValue read Error", error); + LogNSError("PressureMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -63040,22 +71586,22 @@ class ReadIlluminanceMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributePressureMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue() {} + ~SubscribeAttributePressureMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63066,12 +71612,12 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63080,29 +71626,29 @@ class SubscribeAttributeIlluminanceMeasurementMaxMeasuredValue : public Subscrib }; /* - * Attribute Tolerance + * Attribute ClusterRevision */ -class ReadIlluminanceMeasurementTolerance : public ReadAttribute { +class ReadPressureMeasurementClusterRevision : public ReadAttribute { public: - ReadIlluminanceMeasurementTolerance() - : ReadAttribute("tolerance") + ReadPressureMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadIlluminanceMeasurementTolerance() {} + ~ReadPressureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement Tolerance read Error", error); + LogNSError("PressureMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -63110,22 +71656,22 @@ class ReadIlluminanceMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributePressureMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeIlluminanceMeasurementTolerance() {} + ~SubscribeAttributePressureMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63136,12 +71682,12 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.Tolerance response %@", [value description]); + NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63149,30 +71695,50 @@ class SubscribeAttributeIlluminanceMeasurementTolerance : public SubscribeAttrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster FlowMeasurement | 0x0404 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute LightSensorType + * Attribute MeasuredValue */ -class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { +class ReadFlowMeasurementMeasuredValue : public ReadAttribute { public: - ReadIlluminanceMeasurementLightSensorType() - : ReadAttribute("light-sensor-type") + ReadFlowMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadIlluminanceMeasurementLightSensorType() {} + ~ReadFlowMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeLightSensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement LightSensorType read Error", error); + LogNSError("FlowMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -63180,22 +71746,22 @@ class ReadIlluminanceMeasurementLightSensorType : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementLightSensorType : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementLightSensorType() - : SubscribeAttribute("light-sensor-type") + SubscribeAttributeFlowMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeIlluminanceMeasurementLightSensorType() {} + ~SubscribeAttributeFlowMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63206,12 +71772,12 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLightSensorTypeWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.LightSensorType response %@", [value description]); + NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63220,29 +71786,29 @@ class SubscribeAttributeIlluminanceMeasurementLightSensorType : public Subscribe }; /* - * Attribute GeneratedCommandList + * Attribute MinMeasuredValue */ -class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { +class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadIlluminanceMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadFlowMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadIlluminanceMeasurementGeneratedCommandList() {} + ~ReadFlowMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement GeneratedCommandList read Error", error); + LogNSError("FlowMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -63250,22 +71816,22 @@ class ReadIlluminanceMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeFlowMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeIlluminanceMeasurementGeneratedCommandList() {} + ~SubscribeAttributeFlowMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63276,12 +71842,12 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63290,29 +71856,29 @@ class SubscribeAttributeIlluminanceMeasurementGeneratedCommandList : public Subs }; /* - * Attribute AcceptedCommandList + * Attribute MaxMeasuredValue */ -class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { +class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadIlluminanceMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadFlowMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadIlluminanceMeasurementAcceptedCommandList() {} + ~ReadFlowMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement AcceptedCommandList read Error", error); + LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -63320,22 +71886,22 @@ class ReadIlluminanceMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeFlowMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeIlluminanceMeasurementAcceptedCommandList() {} + ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63346,12 +71912,12 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63360,29 +71926,29 @@ class SubscribeAttributeIlluminanceMeasurementAcceptedCommandList : public Subsc }; /* - * Attribute AttributeList + * Attribute Tolerance */ -class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { +class ReadFlowMeasurementTolerance : public ReadAttribute { public: - ReadIlluminanceMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadFlowMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadIlluminanceMeasurementAttributeList() {} + ~ReadFlowMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement AttributeList read Error", error); + LogNSError("FlowMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -63390,22 +71956,22 @@ class ReadIlluminanceMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeFlowMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeIlluminanceMeasurementAttributeList() {} + ~SubscribeAttributeFlowMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63416,12 +71982,12 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63430,29 +71996,29 @@ class SubscribeAttributeIlluminanceMeasurementAttributeList : public SubscribeAt }; /* - * Attribute FeatureMap + * Attribute GeneratedCommandList */ -class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { +class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadIlluminanceMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadFlowMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadIlluminanceMeasurementFeatureMap() {} + ~ReadFlowMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement FeatureMap read Error", error); + LogNSError("FlowMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -63460,22 +72026,22 @@ class ReadIlluminanceMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeFlowMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeIlluminanceMeasurementFeatureMap() {} + ~SubscribeAttributeFlowMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63486,12 +72052,12 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63500,29 +72066,29 @@ class SubscribeAttributeIlluminanceMeasurementFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute AcceptedCommandList */ -class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { +class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadIlluminanceMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadFlowMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadIlluminanceMeasurementClusterRevision() {} + ~ReadFlowMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("IlluminanceMeasurement ClusterRevision read Error", error); + LogNSError("FlowMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -63530,22 +72096,22 @@ class ReadIlluminanceMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeIlluminanceMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIlluminanceMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeFlowMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeIlluminanceMeasurementClusterRevision() {} + ~SubscribeAttributeFlowMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000400) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterIlluminanceMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63556,12 +72122,12 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"IlluminanceMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63569,50 +72135,30 @@ class SubscribeAttributeIlluminanceMeasurementClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster TemperatureMeasurement | 0x0402 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute EventList */ -class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementEventList : public ReadAttribute { public: - ReadTemperatureMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadFlowMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadTemperatureMeasurementMeasuredValue() {} + ~ReadFlowMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.EventList response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement MeasuredValue read Error", error); + LogNSError("FlowMeasurement EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -63620,22 +72166,22 @@ class ReadTemperatureMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeFlowMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTemperatureMeasurementMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63646,12 +72192,12 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63660,29 +72206,29 @@ class SubscribeAttributeTemperatureMeasurementMeasuredValue : public SubscribeAt }; /* - * Attribute MinMeasuredValue + * Attribute AttributeList */ -class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementAttributeList : public ReadAttribute { public: - ReadTemperatureMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadFlowMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTemperatureMeasurementMinMeasuredValue() {} + ~ReadFlowMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement MinMeasuredValue read Error", error); + LogNSError("FlowMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -63690,22 +72236,22 @@ class ReadTemperatureMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeFlowMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTemperatureMeasurementMinMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63716,12 +72262,12 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MinMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63730,29 +72276,29 @@ class SubscribeAttributeTemperatureMeasurementMinMeasuredValue : public Subscrib }; /* - * Attribute MaxMeasuredValue + * Attribute FeatureMap */ -class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadFlowMeasurementFeatureMap : public ReadAttribute { public: - ReadTemperatureMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadFlowMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTemperatureMeasurementMaxMeasuredValue() {} + ~ReadFlowMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement MaxMeasuredValue read Error", error); + LogNSError("FlowMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -63760,22 +72306,22 @@ class ReadTemperatureMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeFlowMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTemperatureMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeFlowMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63786,12 +72332,12 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63800,29 +72346,29 @@ class SubscribeAttributeTemperatureMeasurementMaxMeasuredValue : public Subscrib }; /* - * Attribute Tolerance + * Attribute ClusterRevision */ -class ReadTemperatureMeasurementTolerance : public ReadAttribute { +class ReadFlowMeasurementClusterRevision : public ReadAttribute { public: - ReadTemperatureMeasurementTolerance() - : ReadAttribute("tolerance") + ReadFlowMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTemperatureMeasurementTolerance() {} + ~ReadFlowMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement Tolerance read Error", error); + LogNSError("FlowMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -63830,22 +72376,22 @@ class ReadTemperatureMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeFlowMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTemperatureMeasurementTolerance() {} + ~SubscribeAttributeFlowMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63856,12 +72402,12 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.Tolerance response %@", [value description]); + NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63869,30 +72415,50 @@ class SubscribeAttributeTemperatureMeasurementTolerance : public SubscribeAttrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster RelativeHumidityMeasurement | 0x0405 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasuredValue | 0x0000 | +| * MinMeasuredValue | 0x0001 | +| * MaxMeasuredValue | 0x0002 | +| * Tolerance | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute GeneratedCommandList + * Attribute MeasuredValue */ -class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { +class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { public: - ReadTemperatureMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRelativeHumidityMeasurementMeasuredValue() + : ReadAttribute("measured-value") { } - ~ReadTemperatureMeasurementGeneratedCommandList() {} + ~ReadRelativeHumidityMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement GeneratedCommandList read Error", error); + LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -63900,22 +72466,22 @@ class ReadTemperatureMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() + : SubscribeAttribute("measured-value") { } - ~SubscribeAttributeTemperatureMeasurementGeneratedCommandList() {} + ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63926,12 +72492,12 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -63940,29 +72506,29 @@ class SubscribeAttributeTemperatureMeasurementGeneratedCommandList : public Subs }; /* - * Attribute AcceptedCommandList + * Attribute MinMeasuredValue */ -class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { +class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { public: - ReadTemperatureMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRelativeHumidityMeasurementMinMeasuredValue() + : ReadAttribute("min-measured-value") { } - ~ReadTemperatureMeasurementAcceptedCommandList() {} + ~ReadRelativeHumidityMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement AcceptedCommandList read Error", error); + LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -63970,22 +72536,22 @@ class ReadTemperatureMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() + : SubscribeAttribute("min-measured-value") { } - ~SubscribeAttributeTemperatureMeasurementAcceptedCommandList() {} + ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -63996,12 +72562,12 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64010,29 +72576,29 @@ class SubscribeAttributeTemperatureMeasurementAcceptedCommandList : public Subsc }; /* - * Attribute AttributeList + * Attribute MaxMeasuredValue */ -class ReadTemperatureMeasurementAttributeList : public ReadAttribute { +class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { public: - ReadTemperatureMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadRelativeHumidityMeasurementMaxMeasuredValue() + : ReadAttribute("max-measured-value") { } - ~ReadTemperatureMeasurementAttributeList() {} + ~ReadRelativeHumidityMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement AttributeList read Error", error); + LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); } SetCommandExitStatus(error); }]; @@ -64040,22 +72606,22 @@ class ReadTemperatureMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() + : SubscribeAttribute("max-measured-value") { } - ~SubscribeAttributeTemperatureMeasurementAttributeList() {} + ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64066,12 +72632,12 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeMaxMeasuredValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64080,29 +72646,29 @@ class SubscribeAttributeTemperatureMeasurementAttributeList : public SubscribeAt }; /* - * Attribute FeatureMap + * Attribute Tolerance */ -class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { +class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { public: - ReadTemperatureMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadRelativeHumidityMeasurementTolerance() + : ReadAttribute("tolerance") { } - ~ReadTemperatureMeasurementFeatureMap() {} + ~ReadRelativeHumidityMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement FeatureMap read Error", error); + LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); } SetCommandExitStatus(error); }]; @@ -64110,22 +72676,22 @@ class ReadTemperatureMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeRelativeHumidityMeasurementTolerance() + : SubscribeAttribute("tolerance") { } - ~SubscribeAttributeTemperatureMeasurementFeatureMap() {} + ~SubscribeAttributeRelativeHumidityMeasurementTolerance() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64136,12 +72702,12 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeToleranceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.FeatureMap response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64150,29 +72716,29 @@ class SubscribeAttributeTemperatureMeasurementFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { +class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadTemperatureMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadRelativeHumidityMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTemperatureMeasurementClusterRevision() {} + ~ReadRelativeHumidityMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("TemperatureMeasurement ClusterRevision read Error", error); + LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -64180,22 +72746,22 @@ class ReadTemperatureMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTemperatureMeasurementClusterRevision() {} + ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000402) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTemperatureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64206,12 +72772,12 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64219,55 +72785,30 @@ class SubscribeAttributeTemperatureMeasurementClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster PressureMeasurement | 0x0403 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * ScaledValue | 0x0010 | -| * MinScaledValue | 0x0011 | -| * MaxScaledValue | 0x0012 | -| * ScaledTolerance | 0x0013 | -| * Scale | 0x0014 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute AcceptedCommandList */ -class ReadPressureMeasurementMeasuredValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadPressureMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadRelativeHumidityMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPressureMeasurementMeasuredValue() {} + ~ReadRelativeHumidityMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MeasuredValue read Error", error); + LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -64275,22 +72816,22 @@ class ReadPressureMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePressureMeasurementMeasuredValue() {} + ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64301,12 +72842,12 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64315,29 +72856,29 @@ class SubscribeAttributePressureMeasurementMeasuredValue : public SubscribeAttri }; /* - * Attribute MinMeasuredValue + * Attribute EventList */ -class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementEventList : public ReadAttribute { public: - ReadPressureMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadRelativeHumidityMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadPressureMeasurementMinMeasuredValue() {} + ~ReadRelativeHumidityMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MinMeasuredValue read Error", error); + LogNSError("RelativeHumidityMeasurement EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -64345,22 +72886,22 @@ class ReadPressureMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeRelativeHumidityMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePressureMeasurementMinMeasuredValue() {} + ~SubscribeAttributeRelativeHumidityMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64371,12 +72912,12 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64385,29 +72926,29 @@ class SubscribeAttributePressureMeasurementMinMeasuredValue : public SubscribeAt }; /* - * Attribute MaxMeasuredValue + * Attribute AttributeList */ -class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { public: - ReadPressureMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadRelativeHumidityMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPressureMeasurementMaxMeasuredValue() {} + ~ReadRelativeHumidityMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MaxMeasuredValue read Error", error); + LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -64415,22 +72956,22 @@ class ReadPressureMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeRelativeHumidityMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePressureMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64441,12 +72982,12 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64455,29 +72996,29 @@ class SubscribeAttributePressureMeasurementMaxMeasuredValue : public SubscribeAt }; /* - * Attribute Tolerance + * Attribute FeatureMap */ -class ReadPressureMeasurementTolerance : public ReadAttribute { +class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { public: - ReadPressureMeasurementTolerance() - : ReadAttribute("tolerance") + ReadRelativeHumidityMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPressureMeasurementTolerance() {} + ~ReadRelativeHumidityMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement Tolerance read Error", error); + LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -64485,22 +73026,22 @@ class ReadPressureMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeRelativeHumidityMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePressureMeasurementTolerance() {} + ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64511,12 +73052,12 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Tolerance response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64525,29 +73066,29 @@ class SubscribeAttributePressureMeasurementTolerance : public SubscribeAttribute }; /* - * Attribute ScaledValue + * Attribute ClusterRevision */ -class ReadPressureMeasurementScaledValue : public ReadAttribute { +class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { public: - ReadPressureMeasurementScaledValue() - : ReadAttribute("scaled-value") + ReadRelativeHumidityMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPressureMeasurementScaledValue() {} + ~ReadRelativeHumidityMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000010) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement ScaledValue read Error", error); + LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -64555,22 +73096,22 @@ class ReadPressureMeasurementScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribute { +class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementScaledValue() - : SubscribeAttribute("scaled-value") + SubscribeAttributeRelativeHumidityMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePressureMeasurementScaledValue() {} + ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64581,12 +73122,12 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaledValueWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledValue response %@", [value description]); + NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64594,30 +73135,58 @@ class SubscribeAttributePressureMeasurementScaledValue : public SubscribeAttribu } }; +/*----------------------------------------------------------------------------*\ +| Cluster OccupancySensing | 0x0406 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Occupancy | 0x0000 | +| * OccupancySensorType | 0x0001 | +| * OccupancySensorTypeBitmap | 0x0002 | +| * PIROccupiedToUnoccupiedDelay | 0x0010 | +| * PIRUnoccupiedToOccupiedDelay | 0x0011 | +| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | +| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | +| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | +| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | +| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | +| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | +| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute MinScaledValue + * Attribute Occupancy */ -class ReadPressureMeasurementMinScaledValue : public ReadAttribute { +class ReadOccupancySensingOccupancy : public ReadAttribute { public: - ReadPressureMeasurementMinScaledValue() - : ReadAttribute("min-scaled-value") + ReadOccupancySensingOccupancy() + : ReadAttribute("occupancy") { } - ~ReadPressureMeasurementMinScaledValue() {} + ~ReadOccupancySensingOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MinScaledValue read Error", error); + LogNSError("OccupancySensing Occupancy read Error", error); } SetCommandExitStatus(error); }]; @@ -64625,22 +73194,22 @@ class ReadPressureMeasurementMinScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMinScaledValue() - : SubscribeAttribute("min-scaled-value") + SubscribeAttributeOccupancySensingOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributePressureMeasurementMinScaledValue() {} + ~SubscribeAttributeOccupancySensingOccupancy() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64651,12 +73220,12 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinScaledValueWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MinScaledValue response %@", [value description]); + NSLog(@"OccupancySensing.Occupancy response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64665,29 +73234,29 @@ class SubscribeAttributePressureMeasurementMinScaledValue : public SubscribeAttr }; /* - * Attribute MaxScaledValue + * Attribute OccupancySensorType */ -class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { +class ReadOccupancySensingOccupancySensorType : public ReadAttribute { public: - ReadPressureMeasurementMaxScaledValue() - : ReadAttribute("max-scaled-value") + ReadOccupancySensingOccupancySensorType() + : ReadAttribute("occupancy-sensor-type") { } - ~ReadPressureMeasurementMaxScaledValue() {} + ~ReadOccupancySensingOccupancySensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxScaledValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement MaxScaledValue read Error", error); + LogNSError("OccupancySensing OccupancySensorType read Error", error); } SetCommandExitStatus(error); }]; @@ -64695,22 +73264,22 @@ class ReadPressureMeasurementMaxScaledValue : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementMaxScaledValue() - : SubscribeAttribute("max-scaled-value") + SubscribeAttributeOccupancySensingOccupancySensorType() + : SubscribeAttribute("occupancy-sensor-type") { } - ~SubscribeAttributePressureMeasurementMaxScaledValue() {} + ~SubscribeAttributeOccupancySensingOccupancySensorType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64721,12 +73290,12 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxScaledValueWithParams:params + [cluster subscribeAttributeOccupancySensorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.MaxScaledValue response %@", [value description]); + NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64735,29 +73304,29 @@ class SubscribeAttributePressureMeasurementMaxScaledValue : public SubscribeAttr }; /* - * Attribute ScaledTolerance + * Attribute OccupancySensorTypeBitmap */ -class ReadPressureMeasurementScaledTolerance : public ReadAttribute { +class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { public: - ReadPressureMeasurementScaledTolerance() - : ReadAttribute("scaled-tolerance") + ReadOccupancySensingOccupancySensorTypeBitmap() + : ReadAttribute("occupancy-sensor-type-bitmap") { } - ~ReadPressureMeasurementScaledTolerance() {} + ~ReadOccupancySensingOccupancySensorTypeBitmap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaledToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement ScaledTolerance read Error", error); + LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); } SetCommandExitStatus(error); }]; @@ -64765,22 +73334,22 @@ class ReadPressureMeasurementScaledTolerance : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementScaledTolerance() - : SubscribeAttribute("scaled-tolerance") + SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() + : SubscribeAttribute("occupancy-sensor-type-bitmap") { } - ~SubscribeAttributePressureMeasurementScaledTolerance() {} + ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000013) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64791,12 +73360,12 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaledToleranceWithParams:params + [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ScaledTolerance response %@", [value description]); + NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64805,29 +73374,29 @@ class SubscribeAttributePressureMeasurementScaledTolerance : public SubscribeAtt }; /* - * Attribute Scale + * Attribute PIROccupiedToUnoccupiedDelay */ -class ReadPressureMeasurementScale : public ReadAttribute { +class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadPressureMeasurementScale() - : ReadAttribute("scale") + ReadOccupancySensingPIROccupiedToUnoccupiedDelay() + : ReadAttribute("piroccupied-to-unoccupied-delay") { } - ~ReadPressureMeasurementScale() {} + ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeScaleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement Scale read Error", error); + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -64835,22 +73404,64 @@ class ReadPressureMeasurementScale : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { +class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributePressureMeasurementScale() - : SubscribeAttribute("scale") + WriteOccupancySensingPIROccupiedToUnoccupiedDelay() + : WriteAttribute("piroccupied-to-unoccupied-delay") { + AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementScale() {} + ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x00000014) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000010) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePIROccupiedToUnoccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() + : SubscribeAttribute("piroccupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000010) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64861,12 +73472,12 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScaleWithParams:params + [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.Scale response %@", [value description]); + NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64875,29 +73486,29 @@ class SubscribeAttributePressureMeasurementScale : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute PIRUnoccupiedToOccupiedDelay */ -class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadPressureMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() + : ReadAttribute("pirunoccupied-to-occupied-delay") { } - ~ReadPressureMeasurementGeneratedCommandList() {} + ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement GeneratedCommandList read Error", error); + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -64905,22 +73516,64 @@ class ReadPressureMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementGeneratedCommandList : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributePressureMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() + : WriteAttribute("pirunoccupied-to-occupied-delay") { + AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementGeneratedCommandList() {} + ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000011) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() + : SubscribeAttribute("pirunoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000011) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -64931,12 +73584,12 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -64945,52 +73598,95 @@ class SubscribeAttributePressureMeasurementGeneratedCommandList : public Subscri }; /* - * Attribute AcceptedCommandList + * Attribute PIRUnoccupiedToOccupiedThreshold */ -class ReadPressureMeasurementAcceptedCommandList : public ReadAttribute { +class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadPressureMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : ReadAttribute("pirunoccupied-to-occupied-threshold") { } - ~ReadPressureMeasurementAcceptedCommandList() {} + ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("PressureMeasurement AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + if (error != nil) { + LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributePressureMeasurementAcceptedCommandList : public SubscribeAttribute { +class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributePressureMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : WriteAttribute("pirunoccupied-to-occupied-threshold") { + AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementAcceptedCommandList() {} + ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "PIRUnoccupiedToOccupiedThreshold write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("pirunoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000012) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65001,12 +73697,12 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65015,29 +73711,30 @@ class SubscribeAttributePressureMeasurementAcceptedCommandList : public Subscrib }; /* - * Attribute AttributeList + * Attribute UltrasonicOccupiedToUnoccupiedDelay */ -class ReadPressureMeasurementAttributeList : public ReadAttribute { +class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadPressureMeasurementAttributeList() - : ReadAttribute("attribute-list") + ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") { } - ~ReadPressureMeasurementAttributeList() {} + ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement AttributeList read Error", error); + LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -65045,22 +73742,65 @@ class ReadPressureMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { +public: + WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") + { + AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000020) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "UltrasonicOccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { public: - SubscribeAttributePressureMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() + : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") { } - ~SubscribeAttributePressureMeasurementAttributeList() {} + ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000020) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65071,12 +73811,12 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65085,29 +73825,30 @@ class SubscribeAttributePressureMeasurementAttributeList : public SubscribeAttri }; /* - * Attribute FeatureMap + * Attribute UltrasonicUnoccupiedToOccupiedDelay */ -class ReadPressureMeasurementFeatureMap : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadPressureMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") { } - ~ReadPressureMeasurementFeatureMap() {} + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement FeatureMap read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -65115,22 +73856,65 @@ class ReadPressureMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributePressureMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementFeatureMap() {} + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000021) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "UltrasonicUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000021) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65141,12 +73925,12 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65155,29 +73939,30 @@ class SubscribeAttributePressureMeasurementFeatureMap : public SubscribeAttribut }; /* - * Attribute ClusterRevision + * Attribute UltrasonicUnoccupiedToOccupiedThreshold */ -class ReadPressureMeasurementClusterRevision : public ReadAttribute { +class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadPressureMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") { } - ~ReadPressureMeasurementClusterRevision() {} + ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { - LogNSError("PressureMeasurement ClusterRevision read Error", error); + LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); } SetCommandExitStatus(error); }]; @@ -65185,22 +73970,66 @@ class ReadPressureMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAttribute { +class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributePressureMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") { + AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePressureMeasurementClusterRevision() {} + ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000403) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000022) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPressureMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster + writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " + "UltrasonicUnoccupiedToOccupiedThreshold write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000022) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65211,12 +74040,12 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PressureMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65224,50 +74053,31 @@ class SubscribeAttributePressureMeasurementClusterRevision : public SubscribeAtt } }; -/*----------------------------------------------------------------------------*\ -| Cluster FlowMeasurement | 0x0404 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute MeasuredValue + * Attribute PhysicalContactOccupiedToUnoccupiedDelay */ -class ReadFlowMeasurementMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { public: - ReadFlowMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") { } - ~ReadFlowMeasurementMeasuredValue() {} + ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement MeasuredValue read Error", error); + LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -65275,22 +74085,66 @@ class ReadFlowMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") { + AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementMeasuredValue() {} + ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000030) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " + "PhysicalContactOccupiedToUnoccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() + : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000030) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65301,12 +74155,12 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65315,29 +74169,30 @@ class SubscribeAttributeFlowMeasurementMeasuredValue : public SubscribeAttribute }; /* - * Attribute MinMeasuredValue + * Attribute PhysicalContactUnoccupiedToOccupiedDelay */ -class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { public: - ReadFlowMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") { } - ~ReadFlowMeasurementMinMeasuredValue() {} + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement MinMeasuredValue read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); } SetCommandExitStatus(error); }]; @@ -65345,22 +74200,66 @@ class ReadFlowMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeFlowMeasurementMinMeasuredValue() {} + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000031) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "OccupancySensing " + "PhysicalContactUnoccupiedToOccupiedDelay write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000031) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65371,12 +74270,12 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MinMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65385,29 +74284,30 @@ class SubscribeAttributeFlowMeasurementMinMeasuredValue : public SubscribeAttrib }; /* - * Attribute MaxMeasuredValue + * Attribute PhysicalContactUnoccupiedToOccupiedThreshold */ -class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { public: - ReadFlowMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") { } - ~ReadFlowMeasurementMaxMeasuredValue() {} + ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement MaxMeasuredValue read Error", error); + LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); } SetCommandExitStatus(error); }]; @@ -65415,22 +74315,65 @@ class ReadFlowMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttribute { +class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { public: - SubscribeAttributeFlowMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") + { + AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000032) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OccupancySensing " + "PhysicalContactUnoccupiedToOccupiedTh" + "reshold write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - ~SubscribeAttributeFlowMeasurementMaxMeasuredValue() {} +private: + uint8_t mValue; +}; + +class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +public: + SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() + : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") + { + } + + ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000032) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65441,12 +74384,12 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.MaxMeasuredValue response %@", [value description]); + NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65455,29 +74398,29 @@ class SubscribeAttributeFlowMeasurementMaxMeasuredValue : public SubscribeAttrib }; /* - * Attribute Tolerance + * Attribute GeneratedCommandList */ -class ReadFlowMeasurementTolerance : public ReadAttribute { +class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { public: - ReadFlowMeasurementTolerance() - : ReadAttribute("tolerance") + ReadOccupancySensingGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadFlowMeasurementTolerance() {} + ~ReadOccupancySensingGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement Tolerance read Error", error); + LogNSError("OccupancySensing GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -65485,22 +74428,22 @@ class ReadFlowMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeOccupancySensingGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFlowMeasurementTolerance() {} + ~SubscribeAttributeOccupancySensingGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65511,12 +74454,12 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.Tolerance response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65525,29 +74468,29 @@ class SubscribeAttributeFlowMeasurementTolerance : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { +class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { public: - ReadFlowMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOccupancySensingAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadFlowMeasurementGeneratedCommandList() {} + ~ReadOccupancySensingAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement GeneratedCommandList read Error", error); + LogNSError("OccupancySensing AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -65555,22 +74498,22 @@ class ReadFlowMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOccupancySensingAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFlowMeasurementGeneratedCommandList() {} + ~SubscribeAttributeOccupancySensingAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65581,12 +74524,12 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65595,29 +74538,29 @@ class SubscribeAttributeFlowMeasurementGeneratedCommandList : public SubscribeAt }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { +class ReadOccupancySensingEventList : public ReadAttribute { public: - ReadFlowMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOccupancySensingEventList() + : ReadAttribute("event-list") { } - ~ReadFlowMeasurementAcceptedCommandList() {} + ~ReadOccupancySensingEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OccupancySensing.EventList response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement AcceptedCommandList read Error", error); + LogNSError("OccupancySensing EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -65625,22 +74568,22 @@ class ReadFlowMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingEventList : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOccupancySensingEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeFlowMeasurementAcceptedCommandList() {} + ~SubscribeAttributeOccupancySensingEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65651,12 +74594,12 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"OccupancySensing.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65667,27 +74610,27 @@ class SubscribeAttributeFlowMeasurementAcceptedCommandList : public SubscribeAtt /* * Attribute AttributeList */ -class ReadFlowMeasurementAttributeList : public ReadAttribute { +class ReadOccupancySensingAttributeList : public ReadAttribute { public: - ReadFlowMeasurementAttributeList() + ReadOccupancySensingAttributeList() : ReadAttribute("attribute-list") { } - ~ReadFlowMeasurementAttributeList() {} + ~ReadOccupancySensingAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement AttributeList read Error", error); + LogNSError("OccupancySensing AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -65695,22 +74638,22 @@ class ReadFlowMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementAttributeList() + SubscribeAttributeOccupancySensingAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeFlowMeasurementAttributeList() {} + ~SubscribeAttributeOccupancySensingAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65726,7 +74669,7 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.AttributeList response %@", [value description]); + NSLog(@"OccupancySensing.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65737,27 +74680,27 @@ class SubscribeAttributeFlowMeasurementAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadFlowMeasurementFeatureMap : public ReadAttribute { +class ReadOccupancySensingFeatureMap : public ReadAttribute { public: - ReadFlowMeasurementFeatureMap() + ReadOccupancySensingFeatureMap() : ReadAttribute("feature-map") { } - ~ReadFlowMeasurementFeatureMap() {} + ~ReadOccupancySensingFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement FeatureMap read Error", error); + LogNSError("OccupancySensing FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -65765,22 +74708,22 @@ class ReadFlowMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementFeatureMap() + SubscribeAttributeOccupancySensingFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeFlowMeasurementFeatureMap() {} + ~SubscribeAttributeOccupancySensingFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65796,7 +74739,7 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.FeatureMap response %@", [value description]); + NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65807,27 +74750,27 @@ class SubscribeAttributeFlowMeasurementFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadFlowMeasurementClusterRevision : public ReadAttribute { +class ReadOccupancySensingClusterRevision : public ReadAttribute { public: - ReadFlowMeasurementClusterRevision() + ReadOccupancySensingClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadFlowMeasurementClusterRevision() {} + ~ReadOccupancySensingClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("FlowMeasurement ClusterRevision read Error", error); + LogNSError("OccupancySensing ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -65835,22 +74778,22 @@ class ReadFlowMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFlowMeasurementClusterRevision() + SubscribeAttributeOccupancySensingClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFlowMeasurementClusterRevision() {} + ~SubscribeAttributeOccupancySensingClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000404) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterFlowMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65866,7 +74809,7 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FlowMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65875,15 +74818,12 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu }; /*----------------------------------------------------------------------------*\ -| Cluster RelativeHumidityMeasurement | 0x0405 | +| Cluster WakeOnLan | 0x0503 | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * MeasuredValue | 0x0000 | -| * MinMeasuredValue | 0x0001 | -| * MaxMeasuredValue | 0x0002 | -| * Tolerance | 0x0003 | +| * MACAddress | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -65895,29 +74835,29 @@ class SubscribeAttributeFlowMeasurementClusterRevision : public SubscribeAttribu \*----------------------------------------------------------------------------*/ /* - * Attribute MeasuredValue + * Attribute MACAddress */ -class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { +class ReadWakeOnLanMACAddress : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMeasuredValue() - : ReadAttribute("measured-value") + ReadWakeOnLanMACAddress() + : ReadAttribute("macaddress") { } - ~ReadRelativeHumidityMeasurementMeasuredValue() {} + ~ReadWakeOnLanMACAddress() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement MeasuredValue read Error", error); + LogNSError("WakeOnLAN MACAddress read Error", error); } SetCommandExitStatus(error); }]; @@ -65925,22 +74865,22 @@ class ReadRelativeHumidityMeasurementMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() - : SubscribeAttribute("measured-value") + SubscribeAttributeWakeOnLanMACAddress() + : SubscribeAttribute("macaddress") { } - ~SubscribeAttributeRelativeHumidityMeasurementMeasuredValue() {} + ~SubscribeAttributeWakeOnLanMACAddress() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65951,12 +74891,12 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredValueWithParams:params + [cluster subscribeAttributeMACAddressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MeasuredValue response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); SetCommandExitStatus(error); }]; @@ -65965,29 +74905,29 @@ class SubscribeAttributeRelativeHumidityMeasurementMeasuredValue : public Subscr }; /* - * Attribute MinMeasuredValue + * Attribute GeneratedCommandList */ -class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { +class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMinMeasuredValue() - : ReadAttribute("min-measured-value") + ReadWakeOnLanGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRelativeHumidityMeasurementMinMeasuredValue() {} + ~ReadWakeOnLanGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMinMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement MinMeasuredValue read Error", error); + LogNSError("WakeOnLAN GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -65995,22 +74935,22 @@ class ReadRelativeHumidityMeasurementMinMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() - : SubscribeAttribute("min-measured-value") + SubscribeAttributeWakeOnLanGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue() {} + ~SubscribeAttributeWakeOnLanGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66021,12 +74961,12 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinMeasuredValueWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MinMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66035,29 +74975,29 @@ class SubscribeAttributeRelativeHumidityMeasurementMinMeasuredValue : public Sub }; /* - * Attribute MaxMeasuredValue + * Attribute AcceptedCommandList */ -class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { +class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementMaxMeasuredValue() - : ReadAttribute("max-measured-value") + ReadWakeOnLanAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadRelativeHumidityMeasurementMaxMeasuredValue() {} + ~ReadWakeOnLanAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxMeasuredValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement MaxMeasuredValue read Error", error); + LogNSError("WakeOnLAN AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -66065,22 +75005,22 @@ class ReadRelativeHumidityMeasurementMaxMeasuredValue : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() - : SubscribeAttribute("max-measured-value") + SubscribeAttributeWakeOnLanAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue() {} + ~SubscribeAttributeWakeOnLanAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66091,12 +75031,12 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxMeasuredValueWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.MaxMeasuredValue response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66105,29 +75045,29 @@ class SubscribeAttributeRelativeHumidityMeasurementMaxMeasuredValue : public Sub }; /* - * Attribute Tolerance + * Attribute EventList */ -class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { +class ReadWakeOnLanEventList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementTolerance() - : ReadAttribute("tolerance") + ReadWakeOnLanEventList() + : ReadAttribute("event-list") { } - ~ReadRelativeHumidityMeasurementTolerance() {} + ~ReadWakeOnLanEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeToleranceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.EventList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement Tolerance read Error", error); + LogNSError("WakeOnLAN EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -66135,22 +75075,22 @@ class ReadRelativeHumidityMeasurementTolerance : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanEventList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementTolerance() - : SubscribeAttribute("tolerance") + SubscribeAttributeWakeOnLanEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementTolerance() {} + ~SubscribeAttributeWakeOnLanEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66161,12 +75101,12 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeToleranceWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.Tolerance response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66175,29 +75115,29 @@ class SubscribeAttributeRelativeHumidityMeasurementTolerance : public SubscribeA }; /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute { +class ReadWakeOnLanAttributeList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadWakeOnLanAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadRelativeHumidityMeasurementGeneratedCommandList() {} + ~ReadWakeOnLanAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement GeneratedCommandList read Error", error); + LogNSError("WakeOnLAN AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -66205,22 +75145,22 @@ class ReadRelativeHumidityMeasurementGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeWakeOnLanAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList() {} + ~SubscribeAttributeWakeOnLanAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66231,12 +75171,12 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66245,29 +75185,99 @@ class SubscribeAttributeRelativeHumidityMeasurementGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute { +class ReadWakeOnLanFeatureMap : public ReadAttribute { public: - ReadRelativeHumidityMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadWakeOnLanFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadRelativeHumidityMeasurementAcceptedCommandList() {} + ~ReadWakeOnLanFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("WakeOnLAN FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeWakeOnLanFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeWakeOnLanFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadWakeOnLanClusterRevision : public ReadAttribute { +public: + ReadWakeOnLanClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadWakeOnLanClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement AcceptedCommandList read Error", error); + LogNSError("WakeOnLAN ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -66275,22 +75285,22 @@ class ReadRelativeHumidityMeasurementAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeWakeOnLanClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList() {} + ~SubscribeAttributeWakeOnLanClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66301,12 +75311,12 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66314,100 +75324,188 @@ class SubscribeAttributeRelativeHumidityMeasurementAcceptedCommandList : public } }; +/*----------------------------------------------------------------------------*\ +| Cluster Channel | 0x0504 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ChangeChannel | 0x00 | +| * ChangeChannelByNumber | 0x02 | +| * SkipChannel | 0x03 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ChannelList | 0x0000 | +| * Lineup | 0x0001 | +| * CurrentChannel | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AttributeList + * Command ChangeChannel */ -class ReadRelativeHumidityMeasurementAttributeList : public ReadAttribute { +class ChannelChangeChannel : public ClusterCommand { public: - ReadRelativeHumidityMeasurementAttributeList() - : ReadAttribute("attribute-list") + ChannelChangeChannel() + : ClusterCommand("change-channel") { + AddArgument("Match", &mRequest.match); + ClusterCommand::AddArguments(); } - ~ReadRelativeHumidityMeasurementAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("RelativeHumidityMeasurement AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.match = [[NSString alloc] initWithBytes:mRequest.match.data() + length:mRequest.match.size() + encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeChannelWithParams:params + completion:^( + MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; }; -class SubscribeAttributeRelativeHumidityMeasurementAttributeList : public SubscribeAttribute { +/* + * Command ChangeChannelByNumber + */ +class ChannelChangeChannelByNumber : public ClusterCommand { public: - SubscribeAttributeRelativeHumidityMeasurementAttributeList() - : SubscribeAttribute("attribute-list") + ChannelChangeChannelByNumber() + : ClusterCommand("change-channel-by-number") { + AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); + AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeRelativeHumidityMeasurementAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.majorNumber = [NSNumber numberWithUnsignedShort:mRequest.majorNumber]; + params.minorNumber = [NSNumber numberWithUnsignedShort:mRequest.minorNumber]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster changeChannelByNumberWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Channel::Commands::ChangeChannelByNumber::Type mRequest; +}; + +/* + * Command SkipChannel + */ +class ChannelSkipChannel : public ClusterCommand { +public: + ChannelSkipChannel() + : ClusterCommand("skip-channel") + { + AddArgument("Count", 0, UINT16_MAX, &mRequest.count); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.count = [NSNumber numberWithUnsignedShort:mRequest.count]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipChannelWithParams:params + completion:^(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::Channel::Commands::SkipChannel::Type mRequest; }; /* - * Attribute FeatureMap + * Attribute ChannelList */ -class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { +class ReadChannelChannelList : public ReadAttribute { public: - ReadRelativeHumidityMeasurementFeatureMap() - : ReadAttribute("feature-map") + ReadChannelChannelList() + : ReadAttribute("channel-list") { } - ~ReadRelativeHumidityMeasurementFeatureMap() {} + ~ReadChannelChannelList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ChannelList response %@", [value description]); if (error != nil) { - LogNSError("RelativeHumidityMeasurement FeatureMap read Error", error); + LogNSError("Channel ChannelList read Error", error); } SetCommandExitStatus(error); }]; @@ -66415,22 +75513,20 @@ class ReadRelativeHumidityMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeChannelChannelList : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeChannelChannelList() + : SubscribeAttribute("channel-list") { } - ~SubscribeAttributeRelativeHumidityMeasurementFeatureMap() {} + ~SubscribeAttributeChannelChannelList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66441,12 +75537,12 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeChannelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ChannelList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66455,52 +75551,49 @@ class SubscribeAttributeRelativeHumidityMeasurementFeatureMap : public Subscribe }; /* - * Attribute ClusterRevision + * Attribute Lineup */ -class ReadRelativeHumidityMeasurementClusterRevision : public ReadAttribute { +class ReadChannelLineup : public ReadAttribute { public: - ReadRelativeHumidityMeasurementClusterRevision() - : ReadAttribute("cluster-revision") + ReadChannelLineup() + : ReadAttribute("lineup") { } - ~ReadRelativeHumidityMeasurementClusterRevision() {} + ~ReadChannelLineup() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("RelativeHumidityMeasurement ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster + readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.Lineup response %@", [value description]); + if (error != nil) { + LogNSError("Channel Lineup read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeChannelLineup : public SubscribeAttribute { public: - SubscribeAttributeRelativeHumidityMeasurementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeChannelLineup() + : SubscribeAttribute("lineup") { } - ~SubscribeAttributeRelativeHumidityMeasurementClusterRevision() {} + ~SubscribeAttributeChannelLineup() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000405) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterRelativeHumidityMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66511,12 +75604,12 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeLineupWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RelativeHumidityMeasurement.ClusterRevision response %@", [value description]); + reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.Lineup response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66524,58 +75617,29 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs } }; -/*----------------------------------------------------------------------------*\ -| Cluster OccupancySensing | 0x0406 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Occupancy | 0x0000 | -| * OccupancySensorType | 0x0001 | -| * OccupancySensorTypeBitmap | 0x0002 | -| * PIROccupiedToUnoccupiedDelay | 0x0010 | -| * PIRUnoccupiedToOccupiedDelay | 0x0011 | -| * PIRUnoccupiedToOccupiedThreshold | 0x0012 | -| * UltrasonicOccupiedToUnoccupiedDelay | 0x0020 | -| * UltrasonicUnoccupiedToOccupiedDelay | 0x0021 | -| * UltrasonicUnoccupiedToOccupiedThreshold | 0x0022 | -| * PhysicalContactOccupiedToUnoccupiedDelay | 0x0030 | -| * PhysicalContactUnoccupiedToOccupiedDelay | 0x0031 | -| * PhysicalContactUnoccupiedToOccupiedThreshold | 0x0032 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute Occupancy + * Attribute CurrentChannel */ -class ReadOccupancySensingOccupancy : public ReadAttribute { +class ReadChannelCurrentChannel : public ReadAttribute { public: - ReadOccupancySensingOccupancy() - : ReadAttribute("occupancy") + ReadChannelCurrentChannel() + : ReadAttribute("current-channel") { } - ~ReadOccupancySensingOccupancy() {} + ~ReadChannelCurrentChannel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentChannelWithCompletion:^( + MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.CurrentChannel response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing Occupancy read Error", error); + LogNSError("Channel CurrentChannel read Error", error); } SetCommandExitStatus(error); }]; @@ -66583,22 +75647,20 @@ class ReadOccupancySensingOccupancy : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { +class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingOccupancy() - : SubscribeAttribute("occupancy") + SubscribeAttributeChannelCurrentChannel() + : SubscribeAttribute("current-channel") { } - ~SubscribeAttributeOccupancySensingOccupancy() {} + ~SubscribeAttributeChannelCurrentChannel() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66609,12 +75671,12 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancyWithParams:params + [cluster subscribeAttributeCurrentChannelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.Occupancy response %@", [value description]); + reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.CurrentChannel response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66623,29 +75685,27 @@ class SubscribeAttributeOccupancySensingOccupancy : public SubscribeAttribute { }; /* - * Attribute OccupancySensorType + * Attribute GeneratedCommandList */ -class ReadOccupancySensingOccupancySensorType : public ReadAttribute { +class ReadChannelGeneratedCommandList : public ReadAttribute { public: - ReadOccupancySensingOccupancySensorType() - : ReadAttribute("occupancy-sensor-type") + ReadChannelGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOccupancySensingOccupancySensorType() {} + ~ReadChannelGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing OccupancySensorType read Error", error); + LogNSError("Channel GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -66653,22 +75713,20 @@ class ReadOccupancySensingOccupancySensorType : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAttribute { +class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingOccupancySensorType() - : SubscribeAttribute("occupancy-sensor-type") + SubscribeAttributeChannelGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOccupancySensingOccupancySensorType() {} + ~SubscribeAttributeChannelGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66679,12 +75737,12 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancySensorTypeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66693,29 +75751,27 @@ class SubscribeAttributeOccupancySensingOccupancySensorType : public SubscribeAt }; /* - * Attribute OccupancySensorTypeBitmap + * Attribute AcceptedCommandList */ -class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { +class ReadChannelAcceptedCommandList : public ReadAttribute { public: - ReadOccupancySensingOccupancySensorTypeBitmap() - : ReadAttribute("occupancy-sensor-type-bitmap") + ReadChannelAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOccupancySensingOccupancySensorTypeBitmap() {} + ~ReadChannelAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOccupancySensorTypeBitmapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing OccupancySensorTypeBitmap read Error", error); + LogNSError("Channel AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -66723,22 +75779,20 @@ class ReadOccupancySensingOccupancySensorTypeBitmap : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public SubscribeAttribute { +class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() - : SubscribeAttribute("occupancy-sensor-type-bitmap") + SubscribeAttributeChannelAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap() {} + ~SubscribeAttributeChannelAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66749,12 +75803,12 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancySensorTypeBitmapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.OccupancySensorTypeBitmap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66763,29 +75817,27 @@ class SubscribeAttributeOccupancySensingOccupancySensorTypeBitmap : public Subsc }; /* - * Attribute PIROccupiedToUnoccupiedDelay + * Attribute EventList */ -class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadChannelEventList : public ReadAttribute { public: - ReadOccupancySensingPIROccupiedToUnoccupiedDelay() - : ReadAttribute("piroccupied-to-unoccupied-delay") + ReadChannelEventList() + : ReadAttribute("event-list") { } - ~ReadOccupancySensingPIROccupiedToUnoccupiedDelay() {} + ~ReadChannelEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIROccupiedToUnoccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.EventList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay read Error", error); + LogNSError("Channel EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -66793,64 +75845,20 @@ class ReadOccupancySensingPIROccupiedToUnoccupiedDelay : public ReadAttribute { } }; -class WriteOccupancySensingPIROccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPIROccupiedToUnoccupiedDelay() - : WriteAttribute("piroccupied-to-unoccupied-delay") - { - AddArgument("attr-name", "piroccupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIROccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000010) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributePIROccupiedToUnoccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIROccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeChannelEventList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() - : SubscribeAttribute("piroccupied-to-unoccupied-delay") + SubscribeAttributeChannelEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay() {} + ~SubscribeAttributeChannelEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000010) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66861,12 +75869,12 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIROccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIROccupiedToUnoccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66875,29 +75883,27 @@ class SubscribeAttributeOccupancySensingPIROccupiedToUnoccupiedDelay : public Su }; /* - * Attribute PIRUnoccupiedToOccupiedDelay + * Attribute AttributeList */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadChannelAttributeList : public ReadAttribute { public: - ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() - : ReadAttribute("pirunoccupied-to-occupied-delay") + ReadChannelAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOccupancySensingPIRUnoccupiedToOccupiedDelay() {} + ~ReadChannelAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePIRUnoccupiedToOccupiedDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay read Error", error); + LogNSError("Channel AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -66905,64 +75911,20 @@ class ReadOccupancySensingPIRUnoccupiedToOccupiedDelay : public ReadAttribute { } }; -class WriteOccupancySensingPIRUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() - : WriteAttribute("pirunoccupied-to-occupied-delay") - { - AddArgument("attr-name", "pirunoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIRUnoccupiedToOccupiedDelay() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000011) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributePIRUnoccupiedToOccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() - : SubscribeAttribute("pirunoccupied-to-occupied-delay") + SubscribeAttributeChannelAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay() {} + ~SubscribeAttributeChannelAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000011) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -66973,12 +75935,12 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIRUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -66987,95 +75949,48 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedDelay : public Su }; /* - * Attribute PIRUnoccupiedToOccupiedThreshold + * Attribute FeatureMap */ -class ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadChannelFeatureMap : public ReadAttribute { public: - ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : ReadAttribute("pirunoccupied-to-occupied-threshold") + ReadChannelFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + ~ReadChannelFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000012) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributePIRUnoccupiedToOccupiedThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing PIRUnoccupiedToOccupiedThreshold read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold : public WriteAttribute { -public: - WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : WriteAttribute("pirunoccupied-to-occupied-threshold") - { - AddArgument("attr-name", "pirunoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000012) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributePIRUnoccupiedToOccupiedThresholdWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "PIRUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("Channel FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("pirunoccupied-to-occupied-threshold") + SubscribeAttributeChannelFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeChannelFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000012) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67086,12 +76001,12 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIRUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PIRUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"Channel.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67100,30 +76015,27 @@ class SubscribeAttributeOccupancySensingPIRUnoccupiedToOccupiedThreshold : publi }; /* - * Attribute UltrasonicOccupiedToUnoccupiedDelay + * Attribute ClusterRevision */ -class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadChannelClusterRevision : public ReadAttribute { public: - ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : ReadAttribute("ultrasonic-occupied-to-unoccupied-delay") + ReadChannelClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} + ~ReadChannelClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicOccupiedToUnoccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Channel.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing UltrasonicOccupiedToUnoccupiedDelay read Error", error); + LogNSError("Channel ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -67131,65 +76043,20 @@ class ReadOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public ReadAttri } }; -class WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : WriteAttribute("ultrasonic-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "ultrasonic-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000020) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeUltrasonicOccupiedToUnoccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "UltrasonicOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() - : SubscribeAttribute("ultrasonic-occupied-to-unoccupied-delay") + SubscribeAttributeChannelClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay() {} + ~SubscribeAttributeChannelClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000020) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67200,12 +76067,12 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicOccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicOccupiedToUnoccupiedDelay response %@", [value description]); + NSLog(@"Channel.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67213,97 +76080,128 @@ class SubscribeAttributeOccupancySensingUltrasonicOccupiedToUnoccupiedDelay : pu } }; +/*----------------------------------------------------------------------------*\ +| Cluster TargetNavigator | 0x0505 | +|------------------------------------------------------------------------------| +| Commands: | | +| * NavigateTarget | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TargetList | 0x0000 | +| * CurrentTarget | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute UltrasonicUnoccupiedToOccupiedDelay + * Command NavigateTarget */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public ReadAttribute { +class TargetNavigatorNavigateTarget : public ClusterCommand { public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-delay") + TargetNavigatorNavigateTarget() + : ClusterCommand("navigate-target") { + AddArgument("Target", 0, UINT8_MAX, &mRequest.target); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); } - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedDelay read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.target = [NSNumber numberWithUnsignedChar:mRequest.target]; + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() + length:mRequest.data.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster navigateTargetWithParams:params + completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type mRequest; }; -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public WriteAttribute { +/* + * Attribute TargetList + */ +class ReadTargetNavigatorTargetList : public ReadAttribute { public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-delay") + ReadTargetNavigatorTargetList() + : ReadAttribute("target-list") { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} + ~ReadTargetNavigatorTargetList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000021) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000000) on endpoint %u", endpointId); - [cluster - writeAttributeUltrasonicUnoccupiedToOccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "UltrasonicUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.TargetList response %@", [value description]); + if (error != nil) { + LogNSError("TargetNavigator TargetList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-delay") + SubscribeAttributeTargetNavigatorTargetList() + : SubscribeAttribute("target-list") { } - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay() {} + ~SubscribeAttributeTargetNavigatorTargetList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000021) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67314,12 +76212,12 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeTargetListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.TargetList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67328,30 +76226,29 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedDelay : pu }; /* - * Attribute UltrasonicUnoccupiedToOccupiedThreshold + * Attribute CurrentTarget */ -class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadTargetNavigatorCurrentTarget : public ReadAttribute { public: - ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : ReadAttribute("ultrasonic-unoccupied-to-occupied-threshold") + ReadTargetNavigatorCurrentTarget() + : ReadAttribute("current-target") { } - ~ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} + ~ReadTargetNavigatorCurrentTarget() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeUltrasonicUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing UltrasonicUnoccupiedToOccupiedThreshold read Error", error); + LogNSError("TargetNavigator CurrentTarget read Error", error); } SetCommandExitStatus(error); }]; @@ -67359,66 +76256,92 @@ class ReadOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public ReadA } }; -class WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public WriteAttribute { +class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute { public: - WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : WriteAttribute("ultrasonic-unoccupied-to-occupied-threshold") + SubscribeAttributeTargetNavigatorCurrentTarget() + : SubscribeAttribute("current-target") { - AddArgument("attr-name", "ultrasonic-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeTargetNavigatorCurrentTarget() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCurrentTargetWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster - writeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " - "UltrasonicUnoccupiedToOccupiedThreshold write Error", - error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { +public: + ReadTargetNavigatorGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } -private: - uint8_t mValue; + ~ReadTargetNavigatorGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("TargetNavigator GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("ultrasonic-unoccupied-to-occupied-threshold") + SubscribeAttributeTargetNavigatorGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeTargetNavigatorGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000022) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67429,12 +76352,12 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUltrasonicUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.UltrasonicUnoccupiedToOccupiedThreshold response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67443,30 +76366,29 @@ class SubscribeAttributeOccupancySensingUltrasonicUnoccupiedToOccupiedThreshold }; /* - * Attribute PhysicalContactOccupiedToUnoccupiedDelay + * Attribute AcceptedCommandList */ -class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public ReadAttribute { +class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : ReadAttribute("physical-contact-occupied-to-unoccupied-delay") + ReadTargetNavigatorAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} + ~ReadTargetNavigatorAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactOccupiedToUnoccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PhysicalContactOccupiedToUnoccupiedDelay read Error", error); + LogNSError("TargetNavigator AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -67474,66 +76396,22 @@ class ReadOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public Read } }; -class WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : WriteAttribute("physical-contact-occupied-to-unoccupied-delay") - { - AddArgument("attr-name", "physical-contact-occupied-to-unoccupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000030) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributePhysicalContactOccupiedToUnoccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " - "PhysicalContactOccupiedToUnoccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() - : SubscribeAttribute("physical-contact-occupied-to-unoccupied-delay") + SubscribeAttributeTargetNavigatorAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay() {} + ~SubscribeAttributeTargetNavigatorAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000030) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67544,12 +76422,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactOccupiedToUnoccupiedDelayWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactOccupiedToUnoccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67558,30 +76436,29 @@ class SubscribeAttributeOccupancySensingPhysicalContactOccupiedToUnoccupiedDelay }; /* - * Attribute PhysicalContactUnoccupiedToOccupiedDelay + * Attribute EventList */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public ReadAttribute { +class ReadTargetNavigatorEventList : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : ReadAttribute("physical-contact-unoccupied-to-occupied-delay") + ReadTargetNavigatorEventList() + : ReadAttribute("event-list") { } - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} + ~ReadTargetNavigatorEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedDelayWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.EventList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedDelay read Error", error); + LogNSError("TargetNavigator EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -67589,66 +76466,22 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public Read } }; -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public WriteAttribute { -public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : WriteAttribute("physical-contact-unoccupied-to-occupied-delay") - { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-delay"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000031) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributePhysicalContactUnoccupiedToOccupiedDelayWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "OccupancySensing " - "PhysicalContactUnoccupiedToOccupiedDelay write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorEventList : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-delay") + SubscribeAttributeTargetNavigatorEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay() {} + ~SubscribeAttributeTargetNavigatorEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000031) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67659,12 +76492,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedDelayWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedDelay response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67673,30 +76506,29 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedDelay }; /* - * Attribute PhysicalContactUnoccupiedToOccupiedThreshold + * Attribute AttributeList */ -class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public ReadAttribute { +class ReadTargetNavigatorAttributeList : public ReadAttribute { public: - ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : ReadAttribute("physical-contact-unoccupied-to-occupied-threshold") + ReadTargetNavigatorAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} + ~ReadTargetNavigatorAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePhysicalContactUnoccupiedToOccupiedThresholdWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing PhysicalContactUnoccupiedToOccupiedThreshold read Error", error); + LogNSError("TargetNavigator AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -67704,65 +76536,92 @@ class ReadOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public } }; -class WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public WriteAttribute { +class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute { public: - WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : WriteAttribute("physical-contact-unoccupied-to-occupied-threshold") + SubscribeAttributeTargetNavigatorAttributeList() + : SubscribeAttribute("attribute-list") { - AddArgument("attr-name", "physical-contact-unoccupied-to-occupied-threshold"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeTargetNavigatorAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) WriteAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster writeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OccupancySensing " - "PhysicalContactUnoccupiedToOccupiedTh" - "reshold write Error", - error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; -private: - uint8_t mValue; +/* + * Attribute FeatureMap + */ +class ReadTargetNavigatorFeatureMap : public ReadAttribute { +public: + ReadTargetNavigatorFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadTargetNavigatorFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("TargetNavigator FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() - : SubscribeAttribute("physical-contact-unoccupied-to-occupied-threshold") + SubscribeAttributeTargetNavigatorFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThreshold() {} + ~SubscribeAttributeTargetNavigatorFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x00000032) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67773,12 +76632,12 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhysicalContactUnoccupiedToOccupiedThresholdWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.PhysicalContactUnoccupiedToOccupiedThreshold response %@", [value description]); + NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67787,29 +76646,29 @@ class SubscribeAttributeOccupancySensingPhysicalContactUnoccupiedToOccupiedThres }; /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { +class ReadTargetNavigatorClusterRevision : public ReadAttribute { public: - ReadOccupancySensingGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTargetNavigatorClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOccupancySensingGeneratedCommandList() {} + ~ReadTargetNavigatorClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("OccupancySensing GeneratedCommandList read Error", error); + LogNSError("TargetNavigator ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -67817,22 +76676,22 @@ class ReadOccupancySensingGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOccupancySensingGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTargetNavigatorClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOccupancySensingGeneratedCommandList() {} + ~SubscribeAttributeTargetNavigatorClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -67843,12 +76702,12 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -67856,397 +76715,564 @@ class SubscribeAttributeOccupancySensingGeneratedCommandList : public SubscribeA } }; +/*----------------------------------------------------------------------------*\ +| Cluster MediaPlayback | 0x0506 | +|------------------------------------------------------------------------------| +| Commands: | | +| * Play | 0x00 | +| * Pause | 0x01 | +| * Stop | 0x02 | +| * StartOver | 0x03 | +| * Previous | 0x04 | +| * Next | 0x05 | +| * Rewind | 0x06 | +| * FastForward | 0x07 | +| * SkipForward | 0x08 | +| * SkipBackward | 0x09 | +| * Seek | 0x0B | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CurrentState | 0x0000 | +| * StartTime | 0x0001 | +| * Duration | 0x0002 | +| * SampledPosition | 0x0003 | +| * PlaybackSpeed | 0x0004 | +| * SeekRangeEnd | 0x0005 | +| * SeekRangeStart | 0x0006 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AcceptedCommandList + * Command Play */ -class ReadOccupancySensingAcceptedCommandList : public ReadAttribute { +class MediaPlaybackPlay : public ClusterCommand { public: - ReadOccupancySensingAcceptedCommandList() - : ReadAttribute("accepted-command-list") + MediaPlaybackPlay() + : ClusterCommand("play") { + ClusterCommand::AddArguments(); } - ~ReadOccupancySensingAcceptedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPlayParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster playWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command Pause + */ +class MediaPlaybackPause : public ClusterCommand { +public: + MediaPlaybackPause() + : ClusterCommand("pause") + { + ClusterCommand::AddArguments(); + } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPauseParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster + pauseWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeOccupancySensingAcceptedCommandList : public SubscribeAttribute { +/* + * Command Stop + */ +class MediaPlaybackStop : public ClusterCommand { public: - SubscribeAttributeOccupancySensingAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + MediaPlaybackStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOccupancySensingAcceptedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterStopParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute AttributeList + * Command StartOver */ -class ReadOccupancySensingAttributeList : public ReadAttribute { +class MediaPlaybackStartOver : public ClusterCommand { public: - ReadOccupancySensingAttributeList() - : ReadAttribute("attribute-list") + MediaPlaybackStartOver() + : ClusterCommand("start-over") { + ClusterCommand::AddArguments(); } - ~ReadOccupancySensingAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster + startOverWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeOccupancySensingAttributeList : public SubscribeAttribute { +/* + * Command Previous + */ +class MediaPlaybackPrevious : public ClusterCommand { public: - SubscribeAttributeOccupancySensingAttributeList() - : SubscribeAttribute("attribute-list") + MediaPlaybackPrevious() + : ClusterCommand("previous") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOccupancySensingAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster + previousWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute FeatureMap + * Command Next */ -class ReadOccupancySensingFeatureMap : public ReadAttribute { +class MediaPlaybackNext : public ClusterCommand { public: - ReadOccupancySensingFeatureMap() - : ReadAttribute("feature-map") + MediaPlaybackNext() + : ClusterCommand("next") { + ClusterCommand::AddArguments(); } - ~ReadOccupancySensingFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterNextParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster nextWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeOccupancySensingFeatureMap : public SubscribeAttribute { +/* + * Command Rewind + */ +class MediaPlaybackRewind : public ClusterCommand { public: - SubscribeAttributeOccupancySensingFeatureMap() - : SubscribeAttribute("feature-map") + MediaPlaybackRewind() + : ClusterCommand("rewind") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOccupancySensingFeatureMap() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterRewindParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster + rewindWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute ClusterRevision + * Command FastForward */ -class ReadOccupancySensingClusterRevision : public ReadAttribute { +class MediaPlaybackFastForward : public ClusterCommand { public: - ReadOccupancySensingClusterRevision() - : ReadAttribute("cluster-revision") + MediaPlaybackFastForward() + : ClusterCommand("fast-forward") { + ClusterCommand::AddArguments(); } - ~ReadOccupancySensingClusterRevision() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("OccupancySensing ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster fastForwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeOccupancySensingClusterRevision : public SubscribeAttribute { +/* + * Command SkipForward + */ +class MediaPlaybackSkipForward : public ClusterCommand { public: - SubscribeAttributeOccupancySensingClusterRevision() - : SubscribeAttribute("cluster-revision") + MediaPlaybackSkipForward() + : ClusterCommand("skip-forward") { + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeOccupancySensingClusterRevision() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000406) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOccupancySensing alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipForwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OccupancySensing.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } -}; -/*----------------------------------------------------------------------------*\ -| Cluster WakeOnLan | 0x0503 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MACAddress | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +private: + chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; +}; /* - * Attribute MACAddress + * Command SkipBackward */ -class ReadWakeOnLanMACAddress : public ReadAttribute { +class MediaPlaybackSkipBackward : public ClusterCommand { public: - ReadWakeOnLanMACAddress() - : ReadAttribute("macaddress") + MediaPlaybackSkipBackward() + : ClusterCommand("skip-backward") { + AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); + ClusterCommand::AddArguments(); } - ~ReadWakeOnLanMACAddress() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); - if (error != nil) { - LogNSError("WakeOnLAN MACAddress read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster skipBackwardWithParams:params + completion:^( + MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; }; -class SubscribeAttributeWakeOnLanMACAddress : public SubscribeAttribute { +/* + * Command Seek + */ +class MediaPlaybackSeek : public ClusterCommand { public: - SubscribeAttributeWakeOnLanMACAddress() - : SubscribeAttribute("macaddress") + MediaPlaybackSeek() + : ClusterCommand("seek") { + AddArgument("Position", 0, UINT64_MAX, &mRequest.position); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeWakeOnLanMACAddress() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.position = [NSNumber numberWithUnsignedLongLong:mRequest.position]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster seekWithParams:params + completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeMACAddressWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.MACAddress response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Attribute CurrentState */ -class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { +class ReadMediaPlaybackCurrentState : public ReadAttribute { public: - ReadWakeOnLanGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMediaPlaybackCurrentState() + : ReadAttribute("current-state") { } - ~ReadWakeOnLanGeneratedCommandList() {} + ~ReadMediaPlaybackCurrentState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.CurrentState response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN GeneratedCommandList read Error", error); + LogNSError("MediaPlayback CurrentState read Error", error); } SetCommandExitStatus(error); }]; @@ -68254,22 +77280,22 @@ class ReadWakeOnLanGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMediaPlaybackCurrentState() + : SubscribeAttribute("current-state") { } - ~SubscribeAttributeWakeOnLanGeneratedCommandList() {} + ~SubscribeAttributeMediaPlaybackCurrentState() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68280,12 +77306,12 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCurrentStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.CurrentState response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68294,29 +77320,29 @@ class SubscribeAttributeWakeOnLanGeneratedCommandList : public SubscribeAttribut }; /* - * Attribute AcceptedCommandList + * Attribute StartTime */ -class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { +class ReadMediaPlaybackStartTime : public ReadAttribute { public: - ReadWakeOnLanAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMediaPlaybackStartTime() + : ReadAttribute("start-time") { } - ~ReadWakeOnLanAcceptedCommandList() {} + ~ReadMediaPlaybackStartTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.StartTime response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN AcceptedCommandList read Error", error); + LogNSError("MediaPlayback StartTime read Error", error); } SetCommandExitStatus(error); }]; @@ -68324,22 +77350,22 @@ class ReadWakeOnLanAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMediaPlaybackStartTime() + : SubscribeAttribute("start-time") { } - ~SubscribeAttributeWakeOnLanAcceptedCommandList() {} + ~SubscribeAttributeMediaPlaybackStartTime() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68350,12 +77376,12 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeStartTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.StartTime response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68364,29 +77390,29 @@ class SubscribeAttributeWakeOnLanAcceptedCommandList : public SubscribeAttribute }; /* - * Attribute AttributeList + * Attribute Duration */ -class ReadWakeOnLanAttributeList : public ReadAttribute { +class ReadMediaPlaybackDuration : public ReadAttribute { public: - ReadWakeOnLanAttributeList() - : ReadAttribute("attribute-list") + ReadMediaPlaybackDuration() + : ReadAttribute("duration") { } - ~ReadWakeOnLanAttributeList() {} + ~ReadMediaPlaybackDuration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.Duration response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN AttributeList read Error", error); + LogNSError("MediaPlayback Duration read Error", error); } SetCommandExitStatus(error); }]; @@ -68394,22 +77420,22 @@ class ReadWakeOnLanAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeMediaPlaybackDuration() + : SubscribeAttribute("duration") { } - ~SubscribeAttributeWakeOnLanAttributeList() {} + ~SubscribeAttributeMediaPlaybackDuration() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68420,12 +77446,12 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.Duration response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68434,29 +77460,30 @@ class SubscribeAttributeWakeOnLanAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute SampledPosition */ -class ReadWakeOnLanFeatureMap : public ReadAttribute { +class ReadMediaPlaybackSampledPosition : public ReadAttribute { public: - ReadWakeOnLanFeatureMap() - : ReadAttribute("feature-map") + ReadMediaPlaybackSampledPosition() + : ReadAttribute("sampled-position") { } - ~ReadWakeOnLanFeatureMap() {} + ~ReadMediaPlaybackSampledPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSampledPositionWithCompletion:^( + MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN FeatureMap read Error", error); + LogNSError("MediaPlayback SampledPosition read Error", error); } SetCommandExitStatus(error); }]; @@ -68464,22 +77491,22 @@ class ReadWakeOnLanFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeMediaPlaybackSampledPosition() + : SubscribeAttribute("sampled-position") { } - ~SubscribeAttributeWakeOnLanFeatureMap() {} + ~SubscribeAttributeMediaPlaybackSampledPosition() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68490,12 +77517,12 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSampledPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.FeatureMap response %@", [value description]); + reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68504,29 +77531,29 @@ class SubscribeAttributeWakeOnLanFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute PlaybackSpeed */ -class ReadWakeOnLanClusterRevision : public ReadAttribute { +class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { public: - ReadWakeOnLanClusterRevision() - : ReadAttribute("cluster-revision") + ReadMediaPlaybackPlaybackSpeed() + : ReadAttribute("playback-speed") { } - ~ReadWakeOnLanClusterRevision() {} + ~ReadMediaPlaybackPlaybackSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); if (error != nil) { - LogNSError("WakeOnLAN ClusterRevision read Error", error); + LogNSError("MediaPlayback PlaybackSpeed read Error", error); } SetCommandExitStatus(error); }]; @@ -68534,22 +77561,22 @@ class ReadWakeOnLanClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { public: - SubscribeAttributeWakeOnLanClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeMediaPlaybackPlaybackSpeed() + : SubscribeAttribute("playback-speed") { } - ~SubscribeAttributeWakeOnLanClusterRevision() {} + ~SubscribeAttributeMediaPlaybackPlaybackSpeed() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000503) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68560,12 +77587,12 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePlaybackSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WakeOnLAN.ClusterRevision response %@", [value description]); + NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68573,188 +77600,30 @@ class SubscribeAttributeWakeOnLanClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster Channel | 0x0504 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ChangeChannel | 0x00 | -| * ChangeChannelByNumber | 0x02 | -| * SkipChannel | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ChannelList | 0x0000 | -| * Lineup | 0x0001 | -| * CurrentChannel | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command ChangeChannel - */ -class ChannelChangeChannel : public ClusterCommand { -public: - ChannelChangeChannel() - : ClusterCommand("change-channel") - { - AddArgument("Match", &mRequest.match); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterChangeChannelParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.match = [[NSString alloc] initWithBytes:mRequest.match.data() - length:mRequest.match.size() - encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeChannelWithParams:params - completion:^( - MTRChannelClusterChangeChannelResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::Channel::Commands::ChangeChannel::Type mRequest; -}; - -/* - * Command ChangeChannelByNumber - */ -class ChannelChangeChannelByNumber : public ClusterCommand { -public: - ChannelChangeChannelByNumber() - : ClusterCommand("change-channel-by-number") - { - AddArgument("MajorNumber", 0, UINT16_MAX, &mRequest.majorNumber); - AddArgument("MinorNumber", 0, UINT16_MAX, &mRequest.minorNumber); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterChangeChannelByNumberParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.majorNumber = [NSNumber numberWithUnsignedShort:mRequest.majorNumber]; - params.minorNumber = [NSNumber numberWithUnsignedShort:mRequest.minorNumber]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster changeChannelByNumberWithParams:params - completion:^(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::Channel::Commands::ChangeChannelByNumber::Type mRequest; -}; - -/* - * Command SkipChannel - */ -class ChannelSkipChannel : public ClusterCommand { -public: - ChannelSkipChannel() - : ClusterCommand("skip-channel") - { - AddArgument("Count", 0, UINT16_MAX, &mRequest.count); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRChannelClusterSkipChannelParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.count = [NSNumber numberWithUnsignedShort:mRequest.count]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipChannelWithParams:params - completion:^(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::Channel::Commands::SkipChannel::Type mRequest; -}; - /* - * Attribute ChannelList + * Attribute SeekRangeEnd */ -class ReadChannelChannelList : public ReadAttribute { +class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { public: - ReadChannelChannelList() - : ReadAttribute("channel-list") + ReadMediaPlaybackSeekRangeEnd() + : ReadAttribute("seek-range-end") { } - ~ReadChannelChannelList() {} + ~ReadMediaPlaybackSeekRangeEnd() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ChannelList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); if (error != nil) { - LogNSError("Channel ChannelList read Error", error); + LogNSError("MediaPlayback SeekRangeEnd read Error", error); } SetCommandExitStatus(error); }]; @@ -68762,20 +77631,22 @@ class ReadChannelChannelList : public ReadAttribute { } }; -class SubscribeAttributeChannelChannelList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { public: - SubscribeAttributeChannelChannelList() - : SubscribeAttribute("channel-list") + SubscribeAttributeMediaPlaybackSeekRangeEnd() + : SubscribeAttribute("seek-range-end") { } - ~SubscribeAttributeChannelChannelList() {} + ~SubscribeAttributeMediaPlaybackSeekRangeEnd() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68786,12 +77657,12 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelListWithParams:params + [cluster subscribeAttributeSeekRangeEndWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ChannelList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68800,49 +77671,52 @@ class SubscribeAttributeChannelChannelList : public SubscribeAttribute { }; /* - * Attribute Lineup + * Attribute SeekRangeStart */ -class ReadChannelLineup : public ReadAttribute { +class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { public: - ReadChannelLineup() - : ReadAttribute("lineup") + ReadMediaPlaybackSeekRangeStart() + : ReadAttribute("seek-range-start") { } - ~ReadChannelLineup() {} + ~ReadMediaPlaybackSeekRangeStart() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeLineupWithCompletion:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.Lineup response %@", [value description]); - if (error != nil) { - LogNSError("Channel Lineup read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + if (error != nil) { + LogNSError("MediaPlayback SeekRangeStart read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeChannelLineup : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute { public: - SubscribeAttributeChannelLineup() - : SubscribeAttribute("lineup") + SubscribeAttributeMediaPlaybackSeekRangeStart() + : SubscribeAttribute("seek-range-start") { } - ~SubscribeAttributeChannelLineup() {} + ~SubscribeAttributeMediaPlaybackSeekRangeStart() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68853,12 +77727,12 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLineupWithParams:params + [cluster subscribeAttributeSeekRangeStartWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRChannelClusterLineupInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.Lineup response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68867,28 +77741,29 @@ class SubscribeAttributeChannelLineup : public SubscribeAttribute { }; /* - * Attribute CurrentChannel + * Attribute GeneratedCommandList */ -class ReadChannelCurrentChannel : public ReadAttribute { +class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { public: - ReadChannelCurrentChannel() - : ReadAttribute("current-channel") + ReadMediaPlaybackGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadChannelCurrentChannel() {} + ~ReadMediaPlaybackGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentChannelWithCompletion:^( - MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.CurrentChannel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("Channel CurrentChannel read Error", error); + LogNSError("MediaPlayback GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -68896,20 +77771,22 @@ class ReadChannelCurrentChannel : public ReadAttribute { } }; -class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeChannelCurrentChannel() - : SubscribeAttribute("current-channel") + SubscribeAttributeMediaPlaybackGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeChannelCurrentChannel() {} + ~SubscribeAttributeMediaPlaybackGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68920,12 +77797,12 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentChannelWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRChannelClusterChannelInfoStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.CurrentChannel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -68934,27 +77811,29 @@ class SubscribeAttributeChannelCurrentChannel : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadChannelGeneratedCommandList : public ReadAttribute { +class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { public: - ReadChannelGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMediaPlaybackAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadChannelGeneratedCommandList() {} + ~ReadMediaPlaybackAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("Channel GeneratedCommandList read Error", error); + LogNSError("MediaPlayback AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -68962,20 +77841,22 @@ class ReadChannelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeChannelGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMediaPlaybackAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeChannelGeneratedCommandList() {} + ~SubscribeAttributeMediaPlaybackAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -68986,12 +77867,12 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.GeneratedCommandList response %@", [value description]); + NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69000,27 +77881,29 @@ class SubscribeAttributeChannelGeneratedCommandList : public SubscribeAttribute }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadChannelAcceptedCommandList : public ReadAttribute { +class ReadMediaPlaybackEventList : public ReadAttribute { public: - ReadChannelAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMediaPlaybackEventList() + : ReadAttribute("event-list") { } - ~ReadChannelAcceptedCommandList() {} + ~ReadMediaPlaybackEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaPlayback.EventList response %@", [value description]); if (error != nil) { - LogNSError("Channel AcceptedCommandList read Error", error); + LogNSError("MediaPlayback EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -69028,20 +77911,22 @@ class ReadChannelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackEventList : public SubscribeAttribute { public: - SubscribeAttributeChannelAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMediaPlaybackEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeChannelAcceptedCommandList() {} + ~SubscribeAttributeMediaPlaybackEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69052,12 +77937,12 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AcceptedCommandList response %@", [value description]); + NSLog(@"MediaPlayback.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69068,25 +77953,27 @@ class SubscribeAttributeChannelAcceptedCommandList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadChannelAttributeList : public ReadAttribute { +class ReadMediaPlaybackAttributeList : public ReadAttribute { public: - ReadChannelAttributeList() + ReadMediaPlaybackAttributeList() : ReadAttribute("attribute-list") { } - ~ReadChannelAttributeList() {} + ~ReadMediaPlaybackAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AttributeList response %@", [value description]); + NSLog(@"MediaPlayback.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("Channel AttributeList read Error", error); + LogNSError("MediaPlayback AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -69094,20 +77981,22 @@ class ReadChannelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { public: - SubscribeAttributeChannelAttributeList() + SubscribeAttributeMediaPlaybackAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeChannelAttributeList() {} + ~SubscribeAttributeMediaPlaybackAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69123,7 +78012,7 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.AttributeList response %@", [value description]); + NSLog(@"MediaPlayback.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69134,25 +78023,27 @@ class SubscribeAttributeChannelAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadChannelFeatureMap : public ReadAttribute { +class ReadMediaPlaybackFeatureMap : public ReadAttribute { public: - ReadChannelFeatureMap() + ReadMediaPlaybackFeatureMap() : ReadAttribute("feature-map") { } - ~ReadChannelFeatureMap() {} + ~ReadMediaPlaybackFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.FeatureMap response %@", [value description]); + NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("Channel FeatureMap read Error", error); + LogNSError("MediaPlayback FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -69160,20 +78051,22 @@ class ReadChannelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeChannelFeatureMap() + SubscribeAttributeMediaPlaybackFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeChannelFeatureMap() {} + ~SubscribeAttributeMediaPlaybackFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69189,7 +78082,7 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.FeatureMap response %@", [value description]); + NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69200,25 +78093,27 @@ class SubscribeAttributeChannelFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadChannelClusterRevision : public ReadAttribute { +class ReadMediaPlaybackClusterRevision : public ReadAttribute { public: - ReadChannelClusterRevision() + ReadMediaPlaybackClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadChannelClusterRevision() {} + ~ReadMediaPlaybackClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ClusterRevision response %@", [value description]); + NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("Channel ClusterRevision read Error", error); + LogNSError("MediaPlayback ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -69226,20 +78121,22 @@ class ReadChannelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeChannelClusterRevision() + SubscribeAttributeMediaPlaybackClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeChannelClusterRevision() {} + ~SubscribeAttributeMediaPlaybackClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000504) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterChannel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69255,7 +78152,7 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Channel.ClusterRevision response %@", [value description]); + NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69264,14 +78161,17 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster TargetNavigator | 0x0505 | +| Cluster MediaInput | 0x0507 | |------------------------------------------------------------------------------| | Commands: | | -| * NavigateTarget | 0x00 | +| * SelectInput | 0x00 | +| * ShowInputStatus | 0x01 | +| * HideInputStatus | 0x02 | +| * RenameInput | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * TargetList | 0x0000 | -| * CurrentTarget | 0x0001 | +| * InputList | 0x0000 | +| * CurrentInput | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -69283,85 +78183,211 @@ class SubscribeAttributeChannelClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command NavigateTarget + * Command SelectInput */ -class TargetNavigatorNavigateTarget : public ClusterCommand { +class MediaInputSelectInput : public ClusterCommand { public: - TargetNavigatorNavigateTarget() - : ClusterCommand("navigate-target") + MediaInputSelectInput() + : ClusterCommand("select-input") { - AddArgument("Target", 0, UINT8_MAX, &mRequest.target); - AddArgument("Data", &mRequest.data); + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRTargetNavigatorClusterNavigateTargetParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.target = [NSNumber numberWithUnsignedChar:mRequest.target]; - if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() - length:mRequest.data.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.data = nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster selectInputWithParams:params + completion:^(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::MediaInput::Commands::SelectInput::Type mRequest; +}; + +/* + * Command ShowInputStatus + */ +class MediaInputShowInputStatus : public ClusterCommand { +public: + MediaInputShowInputStatus() + : ClusterCommand("show-input-status") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster navigateTargetWithParams:params - completion:^(MTRTargetNavigatorClusterNavigateTargetResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster showInputStatusWithParams:params + completion:^(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::TargetNavigator::Commands::NavigateTarget::Type mRequest; }; /* - * Attribute TargetList + * Command HideInputStatus */ -class ReadTargetNavigatorTargetList : public ReadAttribute { +class MediaInputHideInputStatus : public ClusterCommand { public: - ReadTargetNavigatorTargetList() - : ReadAttribute("target-list") + MediaInputHideInputStatus() + : ClusterCommand("hide-input-status") { + ClusterCommand::AddArguments(); } - ~ReadTargetNavigatorTargetList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster hideInputStatusWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Command RenameInput + */ +class MediaInputRenameInput : public ClusterCommand { +public: + MediaInputRenameInput() + : ClusterCommand("rename-input") + { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); + ClusterCommand::AddArguments(); + } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeTargetListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.TargetList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + params.name = [[NSString alloc] initWithBytes:mRequest.name.data() + length:mRequest.name.size() + encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster renameInputWithParams:params + completion:^(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::MediaInput::Commands::RenameInput::Type mRequest; +}; + +/* + * Attribute InputList + */ +class ReadMediaInputInputList : public ReadAttribute { +public: + ReadMediaInputInputList() + : ReadAttribute("input-list") + { + } + + ~ReadMediaInputInputList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.InputList response %@", [value description]); if (error != nil) { - LogNSError("TargetNavigator TargetList read Error", error); + LogNSError("MediaInput InputList read Error", error); } SetCommandExitStatus(error); }]; @@ -69369,22 +78395,22 @@ class ReadTargetNavigatorTargetList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { +class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorTargetList() - : SubscribeAttribute("target-list") + SubscribeAttributeMediaInputInputList() + : SubscribeAttribute("input-list") { } - ~SubscribeAttributeTargetNavigatorTargetList() {} + ~SubscribeAttributeMediaInputInputList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69395,12 +78421,12 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTargetListWithParams:params + [cluster subscribeAttributeInputListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.TargetList response %@", [value description]); + NSLog(@"MediaInput.InputList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69409,29 +78435,29 @@ class SubscribeAttributeTargetNavigatorTargetList : public SubscribeAttribute { }; /* - * Attribute CurrentTarget + * Attribute CurrentInput */ -class ReadTargetNavigatorCurrentTarget : public ReadAttribute { +class ReadMediaInputCurrentInput : public ReadAttribute { public: - ReadTargetNavigatorCurrentTarget() - : ReadAttribute("current-target") + ReadMediaInputCurrentInput() + : ReadAttribute("current-input") { } - ~ReadTargetNavigatorCurrentTarget() {} + ~ReadMediaInputCurrentInput() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentTargetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.CurrentInput response %@", [value description]); if (error != nil) { - LogNSError("TargetNavigator CurrentTarget read Error", error); + LogNSError("MediaInput CurrentInput read Error", error); } SetCommandExitStatus(error); }]; @@ -69439,22 +78465,92 @@ class ReadTargetNavigatorCurrentTarget : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute { +class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorCurrentTarget() - : SubscribeAttribute("current-target") + SubscribeAttributeMediaInputCurrentInput() + : SubscribeAttribute("current-input") + { + } + + ~SubscribeAttributeMediaInputCurrentInput() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeCurrentInputWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.CurrentInput response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadMediaInputGeneratedCommandList : public ReadAttribute { +public: + ReadMediaInputGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadMediaInputGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("MediaInput GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeMediaInputGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTargetNavigatorCurrentTarget() {} + ~SubscribeAttributeMediaInputGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69465,12 +78561,12 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentTargetWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.CurrentTarget response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69479,29 +78575,29 @@ class SubscribeAttributeTargetNavigatorCurrentTarget : public SubscribeAttribute }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { +class ReadMediaInputAcceptedCommandList : public ReadAttribute { public: - ReadTargetNavigatorGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMediaInputAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTargetNavigatorGeneratedCommandList() {} + ~ReadMediaInputAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("TargetNavigator GeneratedCommandList read Error", error); + LogNSError("MediaInput AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -69509,22 +78605,22 @@ class ReadTargetNavigatorGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMediaInputAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTargetNavigatorGeneratedCommandList() {} + ~SubscribeAttributeMediaInputAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69535,12 +78631,12 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.GeneratedCommandList response %@", [value description]); + NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69549,29 +78645,29 @@ class SubscribeAttributeTargetNavigatorGeneratedCommandList : public SubscribeAt }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { +class ReadMediaInputEventList : public ReadAttribute { public: - ReadTargetNavigatorAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMediaInputEventList() + : ReadAttribute("event-list") { } - ~ReadTargetNavigatorAcceptedCommandList() {} + ~ReadMediaInputEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MediaInput.EventList response %@", [value description]); if (error != nil) { - LogNSError("TargetNavigator AcceptedCommandList read Error", error); + LogNSError("MediaInput EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -69579,22 +78675,22 @@ class ReadTargetNavigatorAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMediaInputEventList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMediaInputEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTargetNavigatorAcceptedCommandList() {} + ~SubscribeAttributeMediaInputEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69605,12 +78701,12 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AcceptedCommandList response %@", [value description]); + NSLog(@"MediaInput.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69621,27 +78717,27 @@ class SubscribeAttributeTargetNavigatorAcceptedCommandList : public SubscribeAtt /* * Attribute AttributeList */ -class ReadTargetNavigatorAttributeList : public ReadAttribute { +class ReadMediaInputAttributeList : public ReadAttribute { public: - ReadTargetNavigatorAttributeList() + ReadMediaInputAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTargetNavigatorAttributeList() {} + ~ReadMediaInputAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + NSLog(@"MediaInput.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("TargetNavigator AttributeList read Error", error); + LogNSError("MediaInput AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -69649,22 +78745,22 @@ class ReadTargetNavigatorAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute { +class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorAttributeList() + SubscribeAttributeMediaInputAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTargetNavigatorAttributeList() {} + ~SubscribeAttributeMediaInputAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69680,7 +78776,7 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.AttributeList response %@", [value description]); + NSLog(@"MediaInput.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69691,27 +78787,27 @@ class SubscribeAttributeTargetNavigatorAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadTargetNavigatorFeatureMap : public ReadAttribute { +class ReadMediaInputFeatureMap : public ReadAttribute { public: - ReadTargetNavigatorFeatureMap() + ReadMediaInputFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTargetNavigatorFeatureMap() {} + ~ReadMediaInputFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + NSLog(@"MediaInput.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("TargetNavigator FeatureMap read Error", error); + LogNSError("MediaInput FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -69719,22 +78815,22 @@ class ReadTargetNavigatorFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorFeatureMap() + SubscribeAttributeMediaInputFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTargetNavigatorFeatureMap() {} + ~SubscribeAttributeMediaInputFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69750,7 +78846,7 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.FeatureMap response %@", [value description]); + NSLog(@"MediaInput.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69761,27 +78857,27 @@ class SubscribeAttributeTargetNavigatorFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadTargetNavigatorClusterRevision : public ReadAttribute { +class ReadMediaInputClusterRevision : public ReadAttribute { public: - ReadTargetNavigatorClusterRevision() + ReadMediaInputClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTargetNavigatorClusterRevision() {} + ~ReadMediaInputClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + NSLog(@"MediaInput.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("TargetNavigator ClusterRevision read Error", error); + LogNSError("MediaInput ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -69789,22 +78885,22 @@ class ReadTargetNavigatorClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTargetNavigatorClusterRevision() + SubscribeAttributeMediaInputClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTargetNavigatorClusterRevision() {} + ~SubscribeAttributeMediaInputClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000505) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTargetNavigator alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -69820,7 +78916,7 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TargetNavigator.ClusterRevision response %@", [value description]); + NSLog(@"MediaInput.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -69829,29 +78925,12 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu }; /*----------------------------------------------------------------------------*\ -| Cluster MediaPlayback | 0x0506 | +| Cluster LowPower | 0x0508 | |------------------------------------------------------------------------------| | Commands: | | -| * Play | 0x00 | -| * Pause | 0x01 | -| * Stop | 0x02 | -| * StartOver | 0x03 | -| * Previous | 0x04 | -| * Next | 0x05 | -| * Rewind | 0x06 | -| * FastForward | 0x07 | -| * SkipForward | 0x08 | -| * SkipBackward | 0x09 | -| * Seek | 0x0B | +| * Sleep | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * CurrentState | 0x0000 | -| * StartTime | 0x0001 | -| * Duration | 0x0002 | -| * SampledPosition | 0x0003 | -| * PlaybackSpeed | 0x0004 | -| * SeekRangeEnd | 0x0005 | -| * SeekRangeStart | 0x0006 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -69863,221 +78942,39 @@ class SubscribeAttributeTargetNavigatorClusterRevision : public SubscribeAttribu \*----------------------------------------------------------------------------*/ /* - * Command Play - */ -class MediaPlaybackPlay : public ClusterCommand { -public: - MediaPlaybackPlay() - : ClusterCommand("play") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPlayParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster playWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command Pause - */ -class MediaPlaybackPause : public ClusterCommand { -public: - MediaPlaybackPause() - : ClusterCommand("pause") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPauseParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster - pauseWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command Stop - */ -class MediaPlaybackStop : public ClusterCommand { -public: - MediaPlaybackStop() - : ClusterCommand("stop") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterStopParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command StartOver - */ -class MediaPlaybackStartOver : public ClusterCommand { -public: - MediaPlaybackStartOver() - : ClusterCommand("start-over") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterStartOverParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster - startOverWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command Previous + * Command Sleep */ -class MediaPlaybackPrevious : public ClusterCommand { +class LowPowerSleep : public ClusterCommand { public: - MediaPlaybackPrevious() - : ClusterCommand("previous") + LowPowerSleep() + : ClusterCommand("sleep") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterPreviousParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRLowPowerClusterSleepParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster - previousWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster sleepWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -70086,306 +78983,225 @@ class MediaPlaybackPrevious : public ClusterCommand { }; /* - * Command Next + * Attribute GeneratedCommandList */ -class MediaPlaybackNext : public ClusterCommand { +class ReadLowPowerGeneratedCommandList : public ReadAttribute { public: - MediaPlaybackNext() - : ClusterCommand("next") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadLowPowerGeneratedCommandList() + : ReadAttribute("generated-command-list") { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterNextParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster nextWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: -}; - -/* - * Command Rewind - */ -class MediaPlaybackRewind : public ClusterCommand { -public: - MediaPlaybackRewind() - : ClusterCommand("rewind") - { - ClusterCommand::AddArguments(); - } + ~ReadLowPowerGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterRewindParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster - rewindWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("LowPower GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command FastForward - */ -class MediaPlaybackFastForward : public ClusterCommand { +class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute { public: - MediaPlaybackFastForward() - : ClusterCommand("fast-forward") + SubscribeAttributeLowPowerGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { - ClusterCommand::AddArguments(); } + ~SubscribeAttributeLowPowerGeneratedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterFastForwardParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster fastForwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: }; /* - * Command SkipForward + * Attribute AcceptedCommandList */ -class MediaPlaybackSkipForward : public ClusterCommand { +class ReadLowPowerAcceptedCommandList : public ReadAttribute { public: - MediaPlaybackSkipForward() - : ClusterCommand("skip-forward") + ReadLowPowerAcceptedCommandList() + : ReadAttribute("accepted-command-list") { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); } + ~ReadLowPowerAcceptedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSkipForwardParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipForwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("LowPower AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipForward::Type mRequest; }; -/* - * Command SkipBackward - */ -class MediaPlaybackSkipBackward : public ClusterCommand { +class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute { public: - MediaPlaybackSkipBackward() - : ClusterCommand("skip-backward") + SubscribeAttributeLowPowerAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { - AddArgument("DeltaPositionMilliseconds", 0, UINT64_MAX, &mRequest.deltaPositionMilliseconds); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeLowPowerAcceptedCommandList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSkipBackwardParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.deltaPositionMilliseconds = [NSNumber numberWithUnsignedLongLong:mRequest.deltaPositionMilliseconds]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster skipBackwardWithParams:params - completion:^( - MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::MediaPlayback::Commands::SkipBackward::Type mRequest; }; /* - * Command Seek + * Attribute EventList */ -class MediaPlaybackSeek : public ClusterCommand { +class ReadLowPowerEventList : public ReadAttribute { public: - MediaPlaybackSeek() - : ClusterCommand("seek") + ReadLowPowerEventList() + : ReadAttribute("event-list") { - AddArgument("Position", 0, UINT64_MAX, &mRequest.position); - ClusterCommand::AddArguments(); } + ~ReadLowPowerEventList() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaPlaybackClusterSeekParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.position = [NSNumber numberWithUnsignedLongLong:mRequest.position]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster seekWithParams:params - completion:^(MTRMediaPlaybackClusterPlaybackResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.EventList response %@", [value description]); + if (error != nil) { + LogNSError("LowPower EventList read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::Clusters::MediaPlayback::Commands::Seek::Type mRequest; +class SubscribeAttributeLowPowerEventList : public SubscribeAttribute { +public: + SubscribeAttributeLowPowerEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeLowPowerEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } }; /* - * Attribute CurrentState + * Attribute AttributeList */ -class ReadMediaPlaybackCurrentState : public ReadAttribute { +class ReadLowPowerAttributeList : public ReadAttribute { public: - ReadMediaPlaybackCurrentState() - : ReadAttribute("current-state") + ReadLowPowerAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadMediaPlaybackCurrentState() {} + ~ReadLowPowerAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback CurrentState read Error", error); + LogNSError("LowPower AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -70393,22 +79209,20 @@ class ReadMediaPlaybackCurrentState : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { +class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackCurrentState() - : SubscribeAttribute("current-state") + SubscribeAttributeLowPowerAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMediaPlaybackCurrentState() {} + ~SubscribeAttributeLowPowerAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70419,12 +79233,12 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentStateWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.CurrentState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70433,29 +79247,27 @@ class SubscribeAttributeMediaPlaybackCurrentState : public SubscribeAttribute { }; /* - * Attribute StartTime + * Attribute FeatureMap */ -class ReadMediaPlaybackStartTime : public ReadAttribute { +class ReadLowPowerFeatureMap : public ReadAttribute { public: - ReadMediaPlaybackStartTime() - : ReadAttribute("start-time") + ReadLowPowerFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMediaPlaybackStartTime() {} + ~ReadLowPowerFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStartTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.StartTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback StartTime read Error", error); + LogNSError("LowPower FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -70463,22 +79275,20 @@ class ReadMediaPlaybackStartTime : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { +class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackStartTime() - : SubscribeAttribute("start-time") + SubscribeAttributeLowPowerFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMediaPlaybackStartTime() {} + ~SubscribeAttributeLowPowerFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70489,12 +79299,12 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartTimeWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.StartTime response %@", [value description]); + NSLog(@"LowPower.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70503,29 +79313,27 @@ class SubscribeAttributeMediaPlaybackStartTime : public SubscribeAttribute { }; /* - * Attribute Duration + * Attribute ClusterRevision */ -class ReadMediaPlaybackDuration : public ReadAttribute { +class ReadLowPowerClusterRevision : public ReadAttribute { public: - ReadMediaPlaybackDuration() - : ReadAttribute("duration") + ReadLowPowerClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMediaPlaybackDuration() {} + ~ReadLowPowerClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.Duration response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LowPower.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback Duration read Error", error); + LogNSError("LowPower ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -70533,22 +79341,20 @@ class ReadMediaPlaybackDuration : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { +class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackDuration() - : SubscribeAttribute("duration") + SubscribeAttributeLowPowerClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaPlaybackDuration() {} + ~SubscribeAttributeLowPowerClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70559,12 +79365,12 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDurationWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.Duration response %@", [value description]); + NSLog(@"LowPower.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70572,31 +79378,94 @@ class SubscribeAttributeMediaPlaybackDuration : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster KeypadInput | 0x0509 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SendKey | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute SampledPosition + * Command SendKey */ -class ReadMediaPlaybackSampledPosition : public ReadAttribute { +class KeypadInputSendKey : public ClusterCommand { public: - ReadMediaPlaybackSampledPosition() - : ReadAttribute("sampled-position") + KeypadInputSendKey() + : ClusterCommand("send-key") { + AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); + ClusterCommand::AddArguments(); } - ~ReadMediaPlaybackSampledPosition() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.keyCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.keyCode)]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster sendKeyWithParams:params + completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadKeypadInputGeneratedCommandList : public ReadAttribute { +public: + ReadKeypadInputGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadKeypadInputGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSampledPositionWithCompletion:^( - MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback SampledPosition read Error", error); + LogNSError("KeypadInput GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -70604,22 +79473,22 @@ class ReadMediaPlaybackSampledPosition : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute { +class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSampledPosition() - : SubscribeAttribute("sampled-position") + SubscribeAttributeKeypadInputGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMediaPlaybackSampledPosition() {} + ~SubscribeAttributeKeypadInputGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70630,12 +79499,12 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSampledPositionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRMediaPlaybackClusterPlaybackPositionStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SampledPosition response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70644,29 +79513,29 @@ class SubscribeAttributeMediaPlaybackSampledPosition : public SubscribeAttribute }; /* - * Attribute PlaybackSpeed + * Attribute AcceptedCommandList */ -class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { +class ReadKeypadInputAcceptedCommandList : public ReadAttribute { public: - ReadMediaPlaybackPlaybackSpeed() - : ReadAttribute("playback-speed") + ReadKeypadInputAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadMediaPlaybackPlaybackSpeed() {} + ~ReadKeypadInputAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributePlaybackSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback PlaybackSpeed read Error", error); + LogNSError("KeypadInput AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -70674,22 +79543,22 @@ class ReadMediaPlaybackPlaybackSpeed : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { +class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackPlaybackSpeed() - : SubscribeAttribute("playback-speed") + SubscribeAttributeKeypadInputAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMediaPlaybackPlaybackSpeed() {} + ~SubscribeAttributeKeypadInputAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000004) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70700,12 +79569,12 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePlaybackSpeedWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.PlaybackSpeed response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70714,29 +79583,29 @@ class SubscribeAttributeMediaPlaybackPlaybackSpeed : public SubscribeAttribute { }; /* - * Attribute SeekRangeEnd + * Attribute EventList */ -class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { +class ReadKeypadInputEventList : public ReadAttribute { public: - ReadMediaPlaybackSeekRangeEnd() - : ReadAttribute("seek-range-end") + ReadKeypadInputEventList() + : ReadAttribute("event-list") { } - ~ReadMediaPlaybackSeekRangeEnd() {} + ~ReadKeypadInputEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSeekRangeEndWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.EventList response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback SeekRangeEnd read Error", error); + LogNSError("KeypadInput EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -70744,22 +79613,22 @@ class ReadMediaPlaybackSeekRangeEnd : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { +class SubscribeAttributeKeypadInputEventList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSeekRangeEnd() - : SubscribeAttribute("seek-range-end") + SubscribeAttributeKeypadInputEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMediaPlaybackSeekRangeEnd() {} + ~SubscribeAttributeKeypadInputEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70770,12 +79639,12 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSeekRangeEndWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeEnd response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70784,29 +79653,29 @@ class SubscribeAttributeMediaPlaybackSeekRangeEnd : public SubscribeAttribute { }; /* - * Attribute SeekRangeStart + * Attribute AttributeList */ -class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { +class ReadKeypadInputAttributeList : public ReadAttribute { public: - ReadMediaPlaybackSeekRangeStart() - : ReadAttribute("seek-range-start") + ReadKeypadInputAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadMediaPlaybackSeekRangeStart() {} + ~ReadKeypadInputAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSeekRangeStartWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback SeekRangeStart read Error", error); + LogNSError("KeypadInput AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -70814,22 +79683,22 @@ class ReadMediaPlaybackSeekRangeStart : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute { +class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackSeekRangeStart() - : SubscribeAttribute("seek-range-start") + SubscribeAttributeKeypadInputAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMediaPlaybackSeekRangeStart() {} + ~SubscribeAttributeKeypadInputAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70840,12 +79709,12 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSeekRangeStartWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.SeekRangeStart response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70854,29 +79723,29 @@ class SubscribeAttributeMediaPlaybackSeekRangeStart : public SubscribeAttribute }; /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { +class ReadKeypadInputFeatureMap : public ReadAttribute { public: - ReadMediaPlaybackGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadKeypadInputFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMediaPlaybackGeneratedCommandList() {} + ~ReadKeypadInputFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback GeneratedCommandList read Error", error); + LogNSError("KeypadInput FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -70884,22 +79753,22 @@ class ReadMediaPlaybackGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeKeypadInputFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMediaPlaybackGeneratedCommandList() {} + ~SubscribeAttributeKeypadInputFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70910,12 +79779,12 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70924,29 +79793,29 @@ class SubscribeAttributeMediaPlaybackGeneratedCommandList : public SubscribeAttr }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { +class ReadKeypadInputClusterRevision : public ReadAttribute { public: - ReadMediaPlaybackAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadKeypadInputClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMediaPlaybackAcceptedCommandList() {} + ~ReadKeypadInputClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback AcceptedCommandList read Error", error); + LogNSError("KeypadInput ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -70954,22 +79823,22 @@ class ReadMediaPlaybackAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeKeypadInputClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaPlaybackAcceptedCommandList() {} + ~SubscribeAttributeKeypadInputClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -70980,12 +79849,12 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -70993,100 +79862,378 @@ class SubscribeAttributeMediaPlaybackAcceptedCommandList : public SubscribeAttri } }; +/*----------------------------------------------------------------------------*\ +| Cluster ContentLauncher | 0x050A | +|------------------------------------------------------------------------------| +| Commands: | | +| * LaunchContent | 0x00 | +| * LaunchURL | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * AcceptHeader | 0x0000 | +| * SupportedStreamingProtocols | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AttributeList + * Command LaunchContent */ -class ReadMediaPlaybackAttributeList : public ReadAttribute { +class ContentLauncherLaunchContent : public ClusterCommand { public: - ReadMediaPlaybackAttributeList() - : ReadAttribute("attribute-list") + ContentLauncherLaunchContent() + : ClusterCommand("launch-content") + , mComplex_Search(&mRequest.search) { + AddArgument("Search", &mComplex_Search); + AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); + AddArgument("Data", &mRequest.data); + ClusterCommand::AddArguments(); } - ~ReadMediaPlaybackAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("MediaPlayback AttributeList read Error", error); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.search = [MTRContentLauncherClusterContentSearchStruct new]; + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + for (auto & entry_1 : mRequest.search.parameterList) { + MTRContentLauncherClusterParameterStruct * newElement_1; + newElement_1 = [MTRContentLauncherClusterParameterStruct new]; + newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type)]; + newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() + length:entry_1.value.size() + encoding:NSUTF8StringEncoding]; + if (entry_1.externalIDList.HasValue()) { + { // Scope for our temporary variables + auto * array_4 = [NSMutableArray new]; + for (auto & entry_4 : entry_1.externalIDList.Value()) { + MTRContentLauncherClusterAdditionalInfoStruct * newElement_4; + newElement_4 = [MTRContentLauncherClusterAdditionalInfoStruct new]; + newElement_4.name = [[NSString alloc] initWithBytes:entry_4.name.data() + length:entry_4.name.size() + encoding:NSUTF8StringEncoding]; + newElement_4.value = [[NSString alloc] initWithBytes:entry_4.value.data() + length:entry_4.value.size() + encoding:NSUTF8StringEncoding]; + [array_4 addObject:newElement_4]; + } + newElement_1.externalIDList = array_4; + } + } else { + newElement_1.externalIDList = nil; + } + [array_1 addObject:newElement_1]; } - SetCommandExitStatus(error); - }]; + params.search.parameterList = array_1; + } + params.autoPlay = [NSNumber numberWithBool:mRequest.autoPlay]; + if (mRequest.data.HasValue()) { + params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() + length:mRequest.data.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.data = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster launchContentWithParams:params + completion:^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; + TypedComplexArgument mComplex_Search; }; -class SubscribeAttributeMediaPlaybackAttributeList : public SubscribeAttribute { +/* + * Command LaunchURL + */ +class ContentLauncherLaunchURL : public ClusterCommand { public: - SubscribeAttributeMediaPlaybackAttributeList() - : SubscribeAttribute("attribute-list") + ContentLauncherLaunchURL() + : ClusterCommand("launch-url") + , mComplex_BrandingInformation(&mRequest.brandingInformation) { + AddArgument("ContentURL", &mRequest.contentURL); + AddArgument("DisplayString", &mRequest.displayString); + AddArgument("BrandingInformation", &mComplex_BrandingInformation); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeMediaPlaybackAttributeList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.contentURL = [[NSString alloc] initWithBytes:mRequest.contentURL.data() + length:mRequest.contentURL.size() + encoding:NSUTF8StringEncoding]; + if (mRequest.displayString.HasValue()) { + params.displayString = [[NSString alloc] initWithBytes:mRequest.displayString.Value().data() + length:mRequest.displayString.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.displayString = nil; } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + if (mRequest.brandingInformation.HasValue()) { + params.brandingInformation = [MTRContentLauncherClusterBrandingInformationStruct new]; + params.brandingInformation.providerName = + [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().providerName.data() + length:mRequest.brandingInformation.Value().providerName.size() + encoding:NSUTF8StringEncoding]; + if (mRequest.brandingInformation.Value().background.HasValue()) { + params.brandingInformation.background = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().background.Value().imageURL.HasValue()) { + params.brandingInformation.background.imageURL = [[NSString alloc] + initWithBytes:mRequest.brandingInformation.Value().background.Value().imageURL.Value().data() + length:mRequest.brandingInformation.Value().background.Value().imageURL.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.background.imageURL = nil; + } + if (mRequest.brandingInformation.Value().background.Value().color.HasValue()) { + params.brandingInformation.background.color = + [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().color.Value().data() + length:mRequest.brandingInformation.Value().background.Value().color.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.background.color = nil; + } + if (mRequest.brandingInformation.Value().background.Value().size.HasValue()) { + params.brandingInformation.background.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.background.size.width = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().width]; + params.brandingInformation.background.size.height = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().height]; + params.brandingInformation.background.size.metric = [NSNumber + numberWithUnsignedChar:chip::to_underlying( + mRequest.brandingInformation.Value().background.Value().size.Value().metric)]; + } else { + params.brandingInformation.background.size = nil; + } + } else { + params.brandingInformation.background = nil; + } + if (mRequest.brandingInformation.Value().logo.HasValue()) { + params.brandingInformation.logo = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().logo.Value().imageURL.HasValue()) { + params.brandingInformation.logo.imageURL = + [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().data() + length:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.logo.imageURL = nil; + } + if (mRequest.brandingInformation.Value().logo.Value().color.HasValue()) { + params.brandingInformation.logo.color = + [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().color.Value().data() + length:mRequest.brandingInformation.Value().logo.Value().color.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.logo.color = nil; + } + if (mRequest.brandingInformation.Value().logo.Value().size.HasValue()) { + params.brandingInformation.logo.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.logo.size.width = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().width]; + params.brandingInformation.logo.size.height = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().height]; + params.brandingInformation.logo.size.metric = [NSNumber + numberWithUnsignedChar:chip::to_underlying( + mRequest.brandingInformation.Value().logo.Value().size.Value().metric)]; + } else { + params.brandingInformation.logo.size = nil; + } + } else { + params.brandingInformation.logo = nil; + } + if (mRequest.brandingInformation.Value().progressBar.HasValue()) { + params.brandingInformation.progressBar = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().progressBar.Value().imageURL.HasValue()) { + params.brandingInformation.progressBar.imageURL = [[NSString alloc] + initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().data() + length:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.progressBar.imageURL = nil; + } + if (mRequest.brandingInformation.Value().progressBar.Value().color.HasValue()) { + params.brandingInformation.progressBar.color = [[NSString alloc] + initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().color.Value().data() + length:mRequest.brandingInformation.Value().progressBar.Value().color.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.progressBar.color = nil; + } + if (mRequest.brandingInformation.Value().progressBar.Value().size.HasValue()) { + params.brandingInformation.progressBar.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.progressBar.size.width = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().width]; + params.brandingInformation.progressBar.size.height = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().height]; + params.brandingInformation.progressBar.size.metric = [NSNumber + numberWithUnsignedChar:chip::to_underlying( + mRequest.brandingInformation.Value().progressBar.Value().size.Value().metric)]; + } else { + params.brandingInformation.progressBar.size = nil; + } + } else { + params.brandingInformation.progressBar = nil; + } + if (mRequest.brandingInformation.Value().splash.HasValue()) { + params.brandingInformation.splash = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().splash.Value().imageURL.HasValue()) { + params.brandingInformation.splash.imageURL = + [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().data() + length:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.splash.imageURL = nil; + } + if (mRequest.brandingInformation.Value().splash.Value().color.HasValue()) { + params.brandingInformation.splash.color = + [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().color.Value().data() + length:mRequest.brandingInformation.Value().splash.Value().color.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.splash.color = nil; + } + if (mRequest.brandingInformation.Value().splash.Value().size.HasValue()) { + params.brandingInformation.splash.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.splash.size.width = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().width]; + params.brandingInformation.splash.size.height = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().height]; + params.brandingInformation.splash.size.metric = [NSNumber + numberWithUnsignedChar:chip::to_underlying( + mRequest.brandingInformation.Value().splash.Value().size.Value().metric)]; + } else { + params.brandingInformation.splash.size = nil; + } + } else { + params.brandingInformation.splash = nil; + } + if (mRequest.brandingInformation.Value().waterMark.HasValue()) { + params.brandingInformation.waterMark = [MTRContentLauncherClusterStyleInformationStruct new]; + if (mRequest.brandingInformation.Value().waterMark.Value().imageURL.HasValue()) { + params.brandingInformation.waterMark.imageURL = [[NSString alloc] + initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().data() + length:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.waterMark.imageURL = nil; + } + if (mRequest.brandingInformation.Value().waterMark.Value().color.HasValue()) { + params.brandingInformation.waterMark.color = + [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().color.Value().data() + length:mRequest.brandingInformation.Value().waterMark.Value().color.Value().size() + encoding:NSUTF8StringEncoding]; + } else { + params.brandingInformation.waterMark.color = nil; + } + if (mRequest.brandingInformation.Value().waterMark.Value().size.HasValue()) { + params.brandingInformation.waterMark.size = [MTRContentLauncherClusterDimensionStruct new]; + params.brandingInformation.waterMark.size.width = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().width]; + params.brandingInformation.waterMark.size.height = + [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().height]; + params.brandingInformation.waterMark.size.metric = [NSNumber + numberWithUnsignedChar:chip::to_underlying( + mRequest.brandingInformation.Value().waterMark.Value().size.Value().metric)]; + } else { + params.brandingInformation.waterMark.size = nil; + } + } else { + params.brandingInformation.waterMark = nil; + } + } else { + params.brandingInformation = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster launchURLWithParams:params + completion:^( + MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; + TypedComplexArgument> + mComplex_BrandingInformation; }; /* - * Attribute FeatureMap + * Attribute AcceptHeader */ -class ReadMediaPlaybackFeatureMap : public ReadAttribute { +class ReadContentLauncherAcceptHeader : public ReadAttribute { public: - ReadMediaPlaybackFeatureMap() - : ReadAttribute("feature-map") + ReadContentLauncherAcceptHeader() + : ReadAttribute("accept-header") { } - ~ReadMediaPlaybackFeatureMap() {} + ~ReadContentLauncherAcceptHeader() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback FeatureMap read Error", error); + LogNSError("ContentLauncher AcceptHeader read Error", error); } SetCommandExitStatus(error); }]; @@ -71094,22 +80241,22 @@ class ReadMediaPlaybackFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute { public: - SubscribeAttributeMediaPlaybackFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeContentLauncherAcceptHeader() + : SubscribeAttribute("accept-header") { } - ~SubscribeAttributeMediaPlaybackFeatureMap() {} + ~SubscribeAttributeContentLauncherAcceptHeader() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71120,12 +80267,12 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptHeaderWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71134,29 +80281,29 @@ class SubscribeAttributeMediaPlaybackFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute SupportedStreamingProtocols */ -class ReadMediaPlaybackClusterRevision : public ReadAttribute { +class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { public: - ReadMediaPlaybackClusterRevision() - : ReadAttribute("cluster-revision") + ReadContentLauncherSupportedStreamingProtocols() + : ReadAttribute("supported-streaming-protocols") { } - ~ReadMediaPlaybackClusterRevision() {} + ~ReadContentLauncherSupportedStreamingProtocols() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); if (error != nil) { - LogNSError("MediaPlayback ClusterRevision read Error", error); + LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); } SetCommandExitStatus(error); }]; @@ -71164,296 +80311,64 @@ class ReadMediaPlaybackClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMediaPlaybackClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeMediaPlaybackClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeMediaPlaybackClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000506) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaPlayback alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeClusterRevisionWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaPlayback.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/*----------------------------------------------------------------------------*\ -| Cluster MediaInput | 0x0507 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelectInput | 0x00 | -| * ShowInputStatus | 0x01 | -| * HideInputStatus | 0x02 | -| * RenameInput | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * InputList | 0x0000 | -| * CurrentInput | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SelectInput - */ -class MediaInputSelectInput : public ClusterCommand { -public: - MediaInputSelectInput() - : ClusterCommand("select-input") - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterSelectInputParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selectInputWithParams:params - completion:^(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::MediaInput::Commands::SelectInput::Type mRequest; -}; - -/* - * Command ShowInputStatus - */ -class MediaInputShowInputStatus : public ClusterCommand { +class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { public: - MediaInputShowInputStatus() - : ClusterCommand("show-input-status") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + WriteContentLauncherSupportedStreamingProtocols() + : WriteAttribute("supported-streaming-protocols") { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterShowInputStatusParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster showInputStatusWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; + AddArgument("attr-name", "supported-streaming-protocols"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } -private: -}; - -/* - * Command HideInputStatus - */ -class MediaInputHideInputStatus : public ClusterCommand { -public: - MediaInputHideInputStatus() - : ClusterCommand("hide-input-status") - { - ClusterCommand::AddArguments(); - } + ~WriteContentLauncherSupportedStreamingProtocols() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterHideInputStatusParams alloc] init]; - params.timedInvokeTimeoutMs + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster hideInputStatusWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Command RenameInput - */ -class MediaInputRenameInput : public ClusterCommand { -public: - MediaInputRenameInput() - : ClusterCommand("rename-input") - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %u", endpointId); + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - params.name = [[NSString alloc] initWithBytes:mRequest.name.data() - length:mRequest.name.size() - encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster renameInputWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster + writeAttributeSupportedStreamingProtocolsWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ContentLauncher SupportedStreamingProtocols write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::MediaInput::Commands::RenameInput::Type mRequest; -}; - -/* - * Attribute InputList - */ -class ReadMediaInputInputList : public ReadAttribute { -public: - ReadMediaInputInputList() - : ReadAttribute("input-list") - { - } - - ~ReadMediaInputInputList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.InputList response %@", [value description]); - if (error != nil) { - LogNSError("MediaInput InputList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } + uint32_t mValue; }; -class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public SubscribeAttribute { public: - SubscribeAttributeMediaInputInputList() - : SubscribeAttribute("input-list") + SubscribeAttributeContentLauncherSupportedStreamingProtocols() + : SubscribeAttribute("supported-streaming-protocols") { } - ~SubscribeAttributeMediaInputInputList() {} + ~SubscribeAttributeContentLauncherSupportedStreamingProtocols() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71464,12 +80379,12 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInputListWithParams:params + [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.InputList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71478,29 +80393,29 @@ class SubscribeAttributeMediaInputInputList : public SubscribeAttribute { }; /* - * Attribute CurrentInput + * Attribute GeneratedCommandList */ -class ReadMediaInputCurrentInput : public ReadAttribute { +class ReadContentLauncherGeneratedCommandList : public ReadAttribute { public: - ReadMediaInputCurrentInput() - : ReadAttribute("current-input") + ReadContentLauncherGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadMediaInputCurrentInput() {} + ~ReadContentLauncherGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentInputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.CurrentInput response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("MediaInput CurrentInput read Error", error); + LogNSError("ContentLauncher GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -71508,22 +80423,22 @@ class ReadMediaInputCurrentInput : public ReadAttribute { } }; -class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { +class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputCurrentInput() - : SubscribeAttribute("current-input") + SubscribeAttributeContentLauncherGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMediaInputCurrentInput() {} + ~SubscribeAttributeContentLauncherGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71534,12 +80449,12 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentInputWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.CurrentInput response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71548,29 +80463,29 @@ class SubscribeAttributeMediaInputCurrentInput : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadMediaInputGeneratedCommandList : public ReadAttribute { +class ReadContentLauncherAcceptedCommandList : public ReadAttribute { public: - ReadMediaInputGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadContentLauncherAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadMediaInputGeneratedCommandList() {} + ~ReadContentLauncherAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("MediaInput GeneratedCommandList read Error", error); + LogNSError("ContentLauncher AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -71578,22 +80493,22 @@ class ReadMediaInputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeContentLauncherAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMediaInputGeneratedCommandList() {} + ~SubscribeAttributeContentLauncherAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71604,12 +80519,12 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.GeneratedCommandList response %@", [value description]); + NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71618,29 +80533,29 @@ class SubscribeAttributeMediaInputGeneratedCommandList : public SubscribeAttribu }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadMediaInputAcceptedCommandList : public ReadAttribute { +class ReadContentLauncherEventList : public ReadAttribute { public: - ReadMediaInputAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadContentLauncherEventList() + : ReadAttribute("event-list") { } - ~ReadMediaInputAcceptedCommandList() {} + ~ReadContentLauncherEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ContentLauncher.EventList response %@", [value description]); if (error != nil) { - LogNSError("MediaInput AcceptedCommandList read Error", error); + LogNSError("ContentLauncher EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -71648,22 +80563,22 @@ class ReadMediaInputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherEventList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeContentLauncherEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMediaInputAcceptedCommandList() {} + ~SubscribeAttributeContentLauncherEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71674,12 +80589,12 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AcceptedCommandList response %@", [value description]); + NSLog(@"ContentLauncher.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71690,27 +80605,27 @@ class SubscribeAttributeMediaInputAcceptedCommandList : public SubscribeAttribut /* * Attribute AttributeList */ -class ReadMediaInputAttributeList : public ReadAttribute { +class ReadContentLauncherAttributeList : public ReadAttribute { public: - ReadMediaInputAttributeList() + ReadContentLauncherAttributeList() : ReadAttribute("attribute-list") { } - ~ReadMediaInputAttributeList() {} + ~ReadContentLauncherAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AttributeList response %@", [value description]); + NSLog(@"ContentLauncher.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("MediaInput AttributeList read Error", error); + LogNSError("ContentLauncher AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -71718,22 +80633,22 @@ class ReadMediaInputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { +class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMediaInputAttributeList() + SubscribeAttributeContentLauncherAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMediaInputAttributeList() {} + ~SubscribeAttributeContentLauncherAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71749,7 +80664,7 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.AttributeList response %@", [value description]); + NSLog(@"ContentLauncher.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71760,27 +80675,27 @@ class SubscribeAttributeMediaInputAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadMediaInputFeatureMap : public ReadAttribute { +class ReadContentLauncherFeatureMap : public ReadAttribute { public: - ReadMediaInputFeatureMap() + ReadContentLauncherFeatureMap() : ReadAttribute("feature-map") { } - ~ReadMediaInputFeatureMap() {} + ~ReadContentLauncherFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.FeatureMap response %@", [value description]); + NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("MediaInput FeatureMap read Error", error); + LogNSError("ContentLauncher FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -71788,22 +80703,22 @@ class ReadMediaInputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { +class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMediaInputFeatureMap() + SubscribeAttributeContentLauncherFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMediaInputFeatureMap() {} + ~SubscribeAttributeContentLauncherFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71819,7 +80734,7 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.FeatureMap response %@", [value description]); + NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71830,27 +80745,27 @@ class SubscribeAttributeMediaInputFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadMediaInputClusterRevision : public ReadAttribute { +class ReadContentLauncherClusterRevision : public ReadAttribute { public: - ReadMediaInputClusterRevision() + ReadContentLauncherClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadMediaInputClusterRevision() {} + ~ReadContentLauncherClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("MediaInput ClusterRevision read Error", error); + LogNSError("ContentLauncher ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -71858,22 +80773,22 @@ class ReadMediaInputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { +class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMediaInputClusterRevision() + SubscribeAttributeContentLauncherClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMediaInputClusterRevision() {} + ~SubscribeAttributeContentLauncherClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000507) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -71889,7 +80804,7 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MediaInput.ClusterRevision response %@", [value description]); + NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -71898,12 +80813,15 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster LowPower | 0x0508 | +| Cluster AudioOutput | 0x050B | |------------------------------------------------------------------------------| | Commands: | | -| * Sleep | 0x00 | +| * SelectOutput | 0x00 | +| * RenameOutput | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | +| * OutputList | 0x0000 | +| * CurrentOutput | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -71915,200 +80833,125 @@ class SubscribeAttributeMediaInputClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command Sleep + * Command SelectOutput */ -class LowPowerSleep : public ClusterCommand { +class AudioOutputSelectOutput : public ClusterCommand { public: - LowPowerSleep() - : ClusterCommand("sleep") + AudioOutputSelectOutput() + : ClusterCommand("select-output") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLowPowerClusterSleepParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster sleepWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster selectOutputWithParams:params + completion:^(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::AudioOutput::Commands::SelectOutput::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Command RenameOutput */ -class ReadLowPowerGeneratedCommandList : public ReadAttribute { +class AudioOutputRenameOutput : public ClusterCommand { public: - ReadLowPowerGeneratedCommandList() - : ReadAttribute("generated-command-list") + AudioOutputRenameOutput() + : ClusterCommand("rename-output") { + AddArgument("Index", 0, UINT8_MAX, &mRequest.index); + AddArgument("Name", &mRequest.name); + ClusterCommand::AddArguments(); } - ~ReadLowPowerGeneratedCommandList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("LowPower GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeLowPowerGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeLowPowerGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeLowPowerGeneratedCommandList() {} + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; + params.name = [[NSString alloc] initWithBytes:mRequest.name.data() + length:mRequest.name.size() + encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster renameOutputWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeGeneratedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadLowPowerAcceptedCommandList : public ReadAttribute { -public: - ReadLowPowerAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadLowPowerAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("LowPower AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } -}; - -class SubscribeAttributeLowPowerAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeLowPowerAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeLowPowerAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } +private: + chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type mRequest; }; /* - * Attribute AttributeList + * Attribute OutputList */ -class ReadLowPowerAttributeList : public ReadAttribute { +class ReadAudioOutputOutputList : public ReadAttribute { public: - ReadLowPowerAttributeList() - : ReadAttribute("attribute-list") + ReadAudioOutputOutputList() + : ReadAttribute("output-list") { } - ~ReadLowPowerAttributeList() {} + ~ReadAudioOutputOutputList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.OutputList response %@", [value description]); if (error != nil) { - LogNSError("LowPower AttributeList read Error", error); + LogNSError("AudioOutput OutputList read Error", error); } SetCommandExitStatus(error); }]; @@ -72116,20 +80959,22 @@ class ReadLowPowerAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeAudioOutputOutputList() + : SubscribeAttribute("output-list") { } - ~SubscribeAttributeLowPowerAttributeList() {} + ~SubscribeAttributeAudioOutputOutputList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72140,12 +80985,12 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOutputListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.AttributeList response %@", [value description]); + NSLog(@"AudioOutput.OutputList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72154,27 +80999,29 @@ class SubscribeAttributeLowPowerAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute CurrentOutput */ -class ReadLowPowerFeatureMap : public ReadAttribute { +class ReadAudioOutputCurrentOutput : public ReadAttribute { public: - ReadLowPowerFeatureMap() - : ReadAttribute("feature-map") + ReadAudioOutputCurrentOutput() + : ReadAttribute("current-output") { } - ~ReadLowPowerFeatureMap() {} + ~ReadAudioOutputCurrentOutput() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); if (error != nil) { - LogNSError("LowPower FeatureMap read Error", error); + LogNSError("AudioOutput CurrentOutput read Error", error); } SetCommandExitStatus(error); }]; @@ -72182,20 +81029,22 @@ class ReadLowPowerFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { public: - SubscribeAttributeLowPowerFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeAudioOutputCurrentOutput() + : SubscribeAttribute("current-output") { } - ~SubscribeAttributeLowPowerFeatureMap() {} + ~SubscribeAttributeAudioOutputCurrentOutput() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72206,12 +81055,12 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCurrentOutputWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.FeatureMap response %@", [value description]); + NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72220,27 +81069,29 @@ class SubscribeAttributeLowPowerFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadLowPowerClusterRevision : public ReadAttribute { +class ReadAudioOutputGeneratedCommandList : public ReadAttribute { public: - ReadLowPowerClusterRevision() - : ReadAttribute("cluster-revision") + ReadAudioOutputGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadLowPowerClusterRevision() {} + ~ReadAudioOutputGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("LowPower ClusterRevision read Error", error); + LogNSError("AudioOutput GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -72248,20 +81099,22 @@ class ReadLowPowerClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLowPowerClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeAudioOutputGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLowPowerClusterRevision() {} + ~SubscribeAttributeAudioOutputGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000508) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -72272,12 +81125,12 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LowPower.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72285,94 +81138,30 @@ class SubscribeAttributeLowPowerClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster KeypadInput | 0x0509 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SendKey | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SendKey - */ -class KeypadInputSendKey : public ClusterCommand { -public: - KeypadInputSendKey() - : ClusterCommand("send-key") - { - AddArgument("KeyCode", 0, UINT8_MAX, &mRequest.keyCode); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRKeypadInputClusterSendKeyParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.keyCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.keyCode)]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster sendKeyWithParams:params - completion:^(MTRKeypadInputClusterSendKeyResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::KeypadInput::Commands::SendKey::Type mRequest; -}; - /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadKeypadInputGeneratedCommandList : public ReadAttribute { +class ReadAudioOutputAcceptedCommandList : public ReadAttribute { public: - ReadKeypadInputGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadAudioOutputAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadKeypadInputGeneratedCommandList() {} + ~ReadAudioOutputAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("KeypadInput GeneratedCommandList read Error", error); + LogNSError("AudioOutput AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -72380,20 +81169,20 @@ class ReadKeypadInputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeAudioOutputAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeKeypadInputGeneratedCommandList() {} + ~SubscribeAttributeAudioOutputAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -72406,12 +81195,12 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.GeneratedCommandList response %@", [value description]); + NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72420,29 +81209,29 @@ class SubscribeAttributeKeypadInputGeneratedCommandList : public SubscribeAttrib }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadKeypadInputAcceptedCommandList : public ReadAttribute { +class ReadAudioOutputEventList : public ReadAttribute { public: - ReadKeypadInputAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadAudioOutputEventList() + : ReadAttribute("event-list") { } - ~ReadKeypadInputAcceptedCommandList() {} + ~ReadAudioOutputEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AudioOutput.EventList response %@", [value description]); if (error != nil) { - LogNSError("KeypadInput AcceptedCommandList read Error", error); + LogNSError("AudioOutput EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -72450,20 +81239,20 @@ class ReadKeypadInputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputEventList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeAudioOutputEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeKeypadInputAcceptedCommandList() {} + ~SubscribeAttributeAudioOutputEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -72476,12 +81265,12 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AcceptedCommandList response %@", [value description]); + NSLog(@"AudioOutput.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72492,27 +81281,27 @@ class SubscribeAttributeKeypadInputAcceptedCommandList : public SubscribeAttribu /* * Attribute AttributeList */ -class ReadKeypadInputAttributeList : public ReadAttribute { +class ReadAudioOutputAttributeList : public ReadAttribute { public: - ReadKeypadInputAttributeList() + ReadAudioOutputAttributeList() : ReadAttribute("attribute-list") { } - ~ReadKeypadInputAttributeList() {} + ~ReadAudioOutputAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AttributeList response %@", [value description]); + NSLog(@"AudioOutput.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("KeypadInput AttributeList read Error", error); + LogNSError("AudioOutput AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -72520,20 +81309,20 @@ class ReadKeypadInputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { +class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputAttributeList() + SubscribeAttributeAudioOutputAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeKeypadInputAttributeList() {} + ~SubscribeAttributeAudioOutputAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -72551,7 +81340,7 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.AttributeList response %@", [value description]); + NSLog(@"AudioOutput.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72562,27 +81351,27 @@ class SubscribeAttributeKeypadInputAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadKeypadInputFeatureMap : public ReadAttribute { +class ReadAudioOutputFeatureMap : public ReadAttribute { public: - ReadKeypadInputFeatureMap() + ReadAudioOutputFeatureMap() : ReadAttribute("feature-map") { } - ~ReadKeypadInputFeatureMap() {} + ~ReadAudioOutputFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + NSLog(@"AudioOutput.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("KeypadInput FeatureMap read Error", error); + LogNSError("AudioOutput FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -72590,20 +81379,20 @@ class ReadKeypadInputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputFeatureMap() + SubscribeAttributeAudioOutputFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeKeypadInputFeatureMap() {} + ~SubscribeAttributeAudioOutputFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -72621,7 +81410,7 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.FeatureMap response %@", [value description]); + NSLog(@"AudioOutput.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72632,27 +81421,27 @@ class SubscribeAttributeKeypadInputFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadKeypadInputClusterRevision : public ReadAttribute { +class ReadAudioOutputClusterRevision : public ReadAttribute { public: - ReadKeypadInputClusterRevision() + ReadAudioOutputClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadKeypadInputClusterRevision() {} + ~ReadAudioOutputClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("KeypadInput ClusterRevision read Error", error); + LogNSError("AudioOutput ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -72660,20 +81449,20 @@ class ReadKeypadInputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeKeypadInputClusterRevision() + SubscribeAttributeAudioOutputClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeKeypadInputClusterRevision() {} + ~SubscribeAttributeAudioOutputClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000509) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterKeypadInput alloc] initWithDevice:device + __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; @@ -72691,7 +81480,7 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"KeypadInput.ClusterRevision response %@", [value description]); + NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -72700,15 +81489,16 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster ContentLauncher | 0x050A | +| Cluster ApplicationLauncher | 0x050C | |------------------------------------------------------------------------------| | Commands: | | -| * LaunchContent | 0x00 | -| * LaunchURL | 0x01 | +| * LaunchApp | 0x00 | +| * StopApp | 0x01 | +| * HideApp | 0x02 | |------------------------------------------------------------------------------| | Attributes: | | -| * AcceptHeader | 0x0000 | -| * SupportedStreamingProtocols | 0x0001 | +| * CatalogList | 0x0000 | +| * CurrentApp | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -72720,357 +81510,212 @@ class SubscribeAttributeKeypadInputClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Command LaunchContent + * Command LaunchApp */ -class ContentLauncherLaunchContent : public ClusterCommand { +class ApplicationLauncherLaunchApp : public ClusterCommand { public: - ContentLauncherLaunchContent() - : ClusterCommand("launch-content") - , mComplex_Search(&mRequest.search) + ApplicationLauncherLaunchApp() + : ClusterCommand("launch-app") + , mComplex_Application(&mRequest.application) { - AddArgument("Search", &mComplex_Search); - AddArgument("AutoPlay", 0, 1, &mRequest.autoPlay); + AddArgument("Application", &mComplex_Application); AddArgument("Data", &mRequest.data); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRContentLauncherClusterLaunchContentParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.search = [MTRContentLauncherClusterContentSearchStruct new]; - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - for (auto & entry_1 : mRequest.search.parameterList) { - MTRContentLauncherClusterParameterStruct * newElement_1; - newElement_1 = [MTRContentLauncherClusterParameterStruct new]; - newElement_1.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.type)]; - newElement_1.value = [[NSString alloc] initWithBytes:entry_1.value.data() - length:entry_1.value.size() - encoding:NSUTF8StringEncoding]; - if (entry_1.externalIDList.HasValue()) { - { // Scope for our temporary variables - auto * array_4 = [NSMutableArray new]; - for (auto & entry_4 : entry_1.externalIDList.Value()) { - MTRContentLauncherClusterAdditionalInfoStruct * newElement_4; - newElement_4 = [MTRContentLauncherClusterAdditionalInfoStruct new]; - newElement_4.name = [[NSString alloc] initWithBytes:entry_4.name.data() - length:entry_4.name.size() - encoding:NSUTF8StringEncoding]; - newElement_4.value = [[NSString alloc] initWithBytes:entry_4.value.data() - length:entry_4.value.size() - encoding:NSUTF8StringEncoding]; - [array_4 addObject:newElement_4]; - } - newElement_1.externalIDList = array_4; - } - } else { - newElement_1.externalIDList = nil; - } - [array_1 addObject:newElement_1]; - } - params.search.parameterList = array_1; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() + length:mRequest.application.Value().applicationID.size() + encoding:NSUTF8StringEncoding]; + } else { + params.application = nil; } - params.autoPlay = [NSNumber numberWithBool:mRequest.autoPlay]; if (mRequest.data.HasValue()) { - params.data = [[NSString alloc] initWithBytes:mRequest.data.Value().data() - length:mRequest.data.Value().size() - encoding:NSUTF8StringEncoding]; + params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; } else { params.data = nil; } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchContentWithParams:params - completion:^(MTRContentLauncherClusterLauncherResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster launchAppWithParams:params + completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, + NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type mRequest; - TypedComplexArgument mComplex_Search; + chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; + TypedComplexArgument> + mComplex_Application; }; /* - * Command LaunchURL + * Command StopApp */ -class ContentLauncherLaunchURL : public ClusterCommand { +class ApplicationLauncherStopApp : public ClusterCommand { public: - ContentLauncherLaunchURL() - : ClusterCommand("launch-url") - , mComplex_BrandingInformation(&mRequest.brandingInformation) + ApplicationLauncherStopApp() + : ClusterCommand("stop-app") + , mComplex_Application(&mRequest.application) { - AddArgument("ContentURL", &mRequest.contentURL); - AddArgument("DisplayString", &mRequest.displayString); - AddArgument("BrandingInformation", &mComplex_BrandingInformation); + AddArgument("Application", &mComplex_Application); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRContentLauncherClusterLaunchURLParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.contentURL = [[NSString alloc] initWithBytes:mRequest.contentURL.data() - length:mRequest.contentURL.size() - encoding:NSUTF8StringEncoding]; - if (mRequest.displayString.HasValue()) { - params.displayString = [[NSString alloc] initWithBytes:mRequest.displayString.Value().data() - length:mRequest.displayString.Value().size() - encoding:NSUTF8StringEncoding]; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() + length:mRequest.application.Value().applicationID.size() + encoding:NSUTF8StringEncoding]; } else { - params.displayString = nil; + params.application = nil; } - if (mRequest.brandingInformation.HasValue()) { - params.brandingInformation = [MTRContentLauncherClusterBrandingInformationStruct new]; - params.brandingInformation.providerName = - [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().providerName.data() - length:mRequest.brandingInformation.Value().providerName.size() - encoding:NSUTF8StringEncoding]; - if (mRequest.brandingInformation.Value().background.HasValue()) { - params.brandingInformation.background = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().background.Value().imageURL.HasValue()) { - params.brandingInformation.background.imageURL = [[NSString alloc] - initWithBytes:mRequest.brandingInformation.Value().background.Value().imageURL.Value().data() - length:mRequest.brandingInformation.Value().background.Value().imageURL.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.background.imageURL = nil; - } - if (mRequest.brandingInformation.Value().background.Value().color.HasValue()) { - params.brandingInformation.background.color = - [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().background.Value().color.Value().data() - length:mRequest.brandingInformation.Value().background.Value().color.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.background.color = nil; - } - if (mRequest.brandingInformation.Value().background.Value().size.HasValue()) { - params.brandingInformation.background.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.background.size.width = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().width]; - params.brandingInformation.background.size.height = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().background.Value().size.Value().height]; - params.brandingInformation.background.size.metric = [NSNumber - numberWithUnsignedChar:chip::to_underlying( - mRequest.brandingInformation.Value().background.Value().size.Value().metric)]; - } else { - params.brandingInformation.background.size = nil; - } - } else { - params.brandingInformation.background = nil; - } - if (mRequest.brandingInformation.Value().logo.HasValue()) { - params.brandingInformation.logo = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().logo.Value().imageURL.HasValue()) { - params.brandingInformation.logo.imageURL = - [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().data() - length:mRequest.brandingInformation.Value().logo.Value().imageURL.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.logo.imageURL = nil; - } - if (mRequest.brandingInformation.Value().logo.Value().color.HasValue()) { - params.brandingInformation.logo.color = - [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().logo.Value().color.Value().data() - length:mRequest.brandingInformation.Value().logo.Value().color.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.logo.color = nil; - } - if (mRequest.brandingInformation.Value().logo.Value().size.HasValue()) { - params.brandingInformation.logo.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.logo.size.width = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().width]; - params.brandingInformation.logo.size.height = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().logo.Value().size.Value().height]; - params.brandingInformation.logo.size.metric = [NSNumber - numberWithUnsignedChar:chip::to_underlying( - mRequest.brandingInformation.Value().logo.Value().size.Value().metric)]; - } else { - params.brandingInformation.logo.size = nil; - } - } else { - params.brandingInformation.logo = nil; - } - if (mRequest.brandingInformation.Value().progressBar.HasValue()) { - params.brandingInformation.progressBar = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().progressBar.Value().imageURL.HasValue()) { - params.brandingInformation.progressBar.imageURL = [[NSString alloc] - initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().data() - length:mRequest.brandingInformation.Value().progressBar.Value().imageURL.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.progressBar.imageURL = nil; - } - if (mRequest.brandingInformation.Value().progressBar.Value().color.HasValue()) { - params.brandingInformation.progressBar.color = [[NSString alloc] - initWithBytes:mRequest.brandingInformation.Value().progressBar.Value().color.Value().data() - length:mRequest.brandingInformation.Value().progressBar.Value().color.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.progressBar.color = nil; - } - if (mRequest.brandingInformation.Value().progressBar.Value().size.HasValue()) { - params.brandingInformation.progressBar.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.progressBar.size.width = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().width]; - params.brandingInformation.progressBar.size.height = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().progressBar.Value().size.Value().height]; - params.brandingInformation.progressBar.size.metric = [NSNumber - numberWithUnsignedChar:chip::to_underlying( - mRequest.brandingInformation.Value().progressBar.Value().size.Value().metric)]; - } else { - params.brandingInformation.progressBar.size = nil; - } - } else { - params.brandingInformation.progressBar = nil; - } - if (mRequest.brandingInformation.Value().splash.HasValue()) { - params.brandingInformation.splash = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().splash.Value().imageURL.HasValue()) { - params.brandingInformation.splash.imageURL = - [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().data() - length:mRequest.brandingInformation.Value().splash.Value().imageURL.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.splash.imageURL = nil; - } - if (mRequest.brandingInformation.Value().splash.Value().color.HasValue()) { - params.brandingInformation.splash.color = - [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().splash.Value().color.Value().data() - length:mRequest.brandingInformation.Value().splash.Value().color.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.splash.color = nil; - } - if (mRequest.brandingInformation.Value().splash.Value().size.HasValue()) { - params.brandingInformation.splash.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.splash.size.width = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().width]; - params.brandingInformation.splash.size.height = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().splash.Value().size.Value().height]; - params.brandingInformation.splash.size.metric = [NSNumber - numberWithUnsignedChar:chip::to_underlying( - mRequest.brandingInformation.Value().splash.Value().size.Value().metric)]; - } else { - params.brandingInformation.splash.size = nil; - } - } else { - params.brandingInformation.splash = nil; - } - if (mRequest.brandingInformation.Value().waterMark.HasValue()) { - params.brandingInformation.waterMark = [MTRContentLauncherClusterStyleInformationStruct new]; - if (mRequest.brandingInformation.Value().waterMark.Value().imageURL.HasValue()) { - params.brandingInformation.waterMark.imageURL = [[NSString alloc] - initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().data() - length:mRequest.brandingInformation.Value().waterMark.Value().imageURL.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.waterMark.imageURL = nil; - } - if (mRequest.brandingInformation.Value().waterMark.Value().color.HasValue()) { - params.brandingInformation.waterMark.color = - [[NSString alloc] initWithBytes:mRequest.brandingInformation.Value().waterMark.Value().color.Value().data() - length:mRequest.brandingInformation.Value().waterMark.Value().color.Value().size() - encoding:NSUTF8StringEncoding]; - } else { - params.brandingInformation.waterMark.color = nil; - } - if (mRequest.brandingInformation.Value().waterMark.Value().size.HasValue()) { - params.brandingInformation.waterMark.size = [MTRContentLauncherClusterDimensionStruct new]; - params.brandingInformation.waterMark.size.width = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().width]; - params.brandingInformation.waterMark.size.height = - [NSNumber numberWithDouble:mRequest.brandingInformation.Value().waterMark.Value().size.Value().height]; - params.brandingInformation.waterMark.size.metric = [NSNumber - numberWithUnsignedChar:chip::to_underlying( - mRequest.brandingInformation.Value().waterMark.Value().size.Value().metric)]; - } else { - params.brandingInformation.waterMark.size = nil; - } - } else { - params.brandingInformation.waterMark = nil; - } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stopAppWithParams:params + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; + TypedComplexArgument> + mComplex_Application; +}; + +/* + * Command HideApp + */ +class ApplicationLauncherHideApp : public ClusterCommand { +public: + ApplicationLauncherHideApp() + : ClusterCommand("hide-app") + , mComplex_Application(&mRequest.application) + { + AddArgument("Application", &mComplex_Application); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.application.HasValue()) { + params.application = [MTRApplicationLauncherClusterApplicationStruct new]; + params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; + params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() + length:mRequest.application.Value().applicationID.size() + encoding:NSUTF8StringEncoding]; } else { - params.brandingInformation = nil; + params.application = nil; } uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster launchURLWithParams:params - completion:^( - MTRContentLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster hideAppWithParams:params + completion:^( + MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } private: - chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type mRequest; - TypedComplexArgument> - mComplex_BrandingInformation; + chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; + TypedComplexArgument> + mComplex_Application; }; /* - * Attribute AcceptHeader + * Attribute CatalogList */ -class ReadContentLauncherAcceptHeader : public ReadAttribute { +class ReadApplicationLauncherCatalogList : public ReadAttribute { public: - ReadContentLauncherAcceptHeader() - : ReadAttribute("accept-header") + ReadApplicationLauncherCatalogList() + : ReadAttribute("catalog-list") { } - ~ReadContentLauncherAcceptHeader() {} + ~ReadApplicationLauncherCatalogList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptHeaderWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); if (error != nil) { - LogNSError("ContentLauncher AcceptHeader read Error", error); + LogNSError("ApplicationLauncher CatalogList read Error", error); } SetCommandExitStatus(error); }]; @@ -73078,22 +81723,22 @@ class ReadContentLauncherAcceptHeader : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAcceptHeader() - : SubscribeAttribute("accept-header") + SubscribeAttributeApplicationLauncherCatalogList() + : SubscribeAttribute("catalog-list") { } - ~SubscribeAttributeContentLauncherAcceptHeader() {} + ~SubscribeAttributeApplicationLauncherCatalogList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73104,12 +81749,12 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptHeaderWithParams:params + [cluster subscribeAttributeCatalogListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptHeader response %@", [value description]); + NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73118,29 +81763,30 @@ class SubscribeAttributeContentLauncherAcceptHeader : public SubscribeAttribute }; /* - * Attribute SupportedStreamingProtocols + * Attribute CurrentApp */ -class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { +class ReadApplicationLauncherCurrentApp : public ReadAttribute { public: - ReadContentLauncherSupportedStreamingProtocols() - : ReadAttribute("supported-streaming-protocols") + ReadApplicationLauncherCurrentApp() + : ReadAttribute("current-app") { } - ~ReadContentLauncherSupportedStreamingProtocols() {} + ~ReadApplicationLauncherCurrentApp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSupportedStreamingProtocolsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeCurrentAppWithCompletion:^( + MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); if (error != nil) { - LogNSError("ContentLauncher SupportedStreamingProtocols read Error", error); + LogNSError("ApplicationLauncher CurrentApp read Error", error); } SetCommandExitStatus(error); }]; @@ -73148,64 +81794,81 @@ class ReadContentLauncherSupportedStreamingProtocols : public ReadAttribute { } }; -class WriteContentLauncherSupportedStreamingProtocols : public WriteAttribute { +class WriteApplicationLauncherCurrentApp : public WriteAttribute { public: - WriteContentLauncherSupportedStreamingProtocols() - : WriteAttribute("supported-streaming-protocols") + WriteApplicationLauncherCurrentApp() + : WriteAttribute("current-app") + , mComplex(&mValue) { - AddArgument("attr-name", "supported-streaming-protocols"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); + AddArgument("attr-name", "current-app"); + AddArgument("attr-value", &mComplex); WriteAttribute::AddArguments(); } - ~WriteContentLauncherSupportedStreamingProtocols() {} + ~WriteApplicationLauncherCurrentApp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) WriteAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) WriteAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRWriteParams alloc] init]; params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value; + if (mValue.IsNull()) { + value = nil; + } else { + value = [MTRApplicationLauncherClusterApplicationEPStruct new]; + value.application = [MTRApplicationLauncherClusterApplicationStruct new]; + value.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mValue.Value().application.catalogVendorID]; + value.application.applicationID = [[NSString alloc] initWithBytes:mValue.Value().application.applicationID.data() + length:mValue.Value().application.applicationID.size() + encoding:NSUTF8StringEncoding]; + if (mValue.Value().endpoint.HasValue()) { + value.endpoint = [NSNumber numberWithUnsignedShort:mValue.Value().endpoint.Value()]; + } else { + value.endpoint = nil; + } + } - [cluster - writeAttributeSupportedStreamingProtocolsWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ContentLauncher SupportedStreamingProtocols write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeCurrentAppWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ApplicationLauncher CurrentApp write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint32_t mValue; + chip::app::DataModel::Nullable mValue; + TypedComplexArgument< + chip::app::DataModel::Nullable> + mComplex; }; -class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherSupportedStreamingProtocols() - : SubscribeAttribute("supported-streaming-protocols") + SubscribeAttributeApplicationLauncherCurrentApp() + : SubscribeAttribute("current-app") { } - ~SubscribeAttributeContentLauncherSupportedStreamingProtocols() {} + ~SubscribeAttributeApplicationLauncherCurrentApp() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73216,12 +81879,12 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedStreamingProtocolsWithParams:params + [cluster subscribeAttributeCurrentAppWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.SupportedStreamingProtocols response %@", [value description]); + reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73232,27 +81895,27 @@ class SubscribeAttributeContentLauncherSupportedStreamingProtocols : public Subs /* * Attribute GeneratedCommandList */ -class ReadContentLauncherGeneratedCommandList : public ReadAttribute { +class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { public: - ReadContentLauncherGeneratedCommandList() + ReadApplicationLauncherGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadContentLauncherGeneratedCommandList() {} + ~ReadApplicationLauncherGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ContentLauncher GeneratedCommandList read Error", error); + LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -73260,22 +81923,22 @@ class ReadContentLauncherGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherGeneratedCommandList() + SubscribeAttributeApplicationLauncherGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeContentLauncherGeneratedCommandList() {} + ~SubscribeAttributeApplicationLauncherGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73291,7 +81954,7 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.GeneratedCommandList response %@", [value description]); + NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73302,27 +81965,27 @@ class SubscribeAttributeContentLauncherGeneratedCommandList : public SubscribeAt /* * Attribute AcceptedCommandList */ -class ReadContentLauncherAcceptedCommandList : public ReadAttribute { +class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { public: - ReadContentLauncherAcceptedCommandList() + ReadApplicationLauncherAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadContentLauncherAcceptedCommandList() {} + ~ReadApplicationLauncherAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ContentLauncher AcceptedCommandList read Error", error); + LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -73330,22 +81993,22 @@ class ReadContentLauncherAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAcceptedCommandList() + SubscribeAttributeApplicationLauncherAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeContentLauncherAcceptedCommandList() {} + ~SubscribeAttributeApplicationLauncherAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73361,7 +82024,7 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AcceptedCommandList response %@", [value description]); + NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73370,29 +82033,29 @@ class SubscribeAttributeContentLauncherAcceptedCommandList : public SubscribeAtt }; /* - * Attribute AttributeList + * Attribute EventList */ -class ReadContentLauncherAttributeList : public ReadAttribute { +class ReadApplicationLauncherEventList : public ReadAttribute { public: - ReadContentLauncherAttributeList() - : ReadAttribute("attribute-list") + ReadApplicationLauncherEventList() + : ReadAttribute("event-list") { } - ~ReadContentLauncherAttributeList() {} + ~ReadApplicationLauncherEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.EventList response %@", [value description]); if (error != nil) { - LogNSError("ContentLauncher AttributeList read Error", error); + LogNSError("ApplicationLauncher EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -73400,22 +82063,22 @@ class ReadContentLauncherAttributeList : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherEventList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeApplicationLauncherEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeContentLauncherAttributeList() {} + ~SubscribeAttributeApplicationLauncherEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73426,82 +82089,12 @@ class SubscribeAttributeContentLauncherAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadContentLauncherFeatureMap : public ReadAttribute { -public: - ReadContentLauncherFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadContentLauncherFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("ContentLauncher FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeContentLauncherFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeContentLauncherFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.FeatureMap response %@", [value description]); + NSLog(@"ApplicationLauncher.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73510,29 +82103,29 @@ class SubscribeAttributeContentLauncherFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadContentLauncherClusterRevision : public ReadAttribute { +class ReadApplicationLauncherAttributeList : public ReadAttribute { public: - ReadContentLauncherClusterRevision() - : ReadAttribute("cluster-revision") + ReadApplicationLauncherAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadContentLauncherClusterRevision() {} + ~ReadApplicationLauncherAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ContentLauncher ClusterRevision read Error", error); + LogNSError("ApplicationLauncher AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -73540,22 +82133,22 @@ class ReadContentLauncherClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttribute { public: - SubscribeAttributeContentLauncherClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeApplicationLauncherAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeContentLauncherClusterRevision() {} + ~SubscribeAttributeApplicationLauncherAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050A) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterContentLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73566,12 +82159,12 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ContentLauncher.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73579,146 +82172,30 @@ class SubscribeAttributeContentLauncherClusterRevision : public SubscribeAttribu } }; -/*----------------------------------------------------------------------------*\ -| Cluster AudioOutput | 0x050B | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelectOutput | 0x00 | -| * RenameOutput | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * OutputList | 0x0000 | -| * CurrentOutput | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command SelectOutput - */ -class AudioOutputSelectOutput : public ClusterCommand { -public: - AudioOutputSelectOutput() - : ClusterCommand("select-output") - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAudioOutputClusterSelectOutputParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster selectOutputWithParams:params - completion:^(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::AudioOutput::Commands::SelectOutput::Type mRequest; -}; - -/* - * Command RenameOutput - */ -class AudioOutputRenameOutput : public ClusterCommand { -public: - AudioOutputRenameOutput() - : ClusterCommand("rename-output") - { - AddArgument("Index", 0, UINT8_MAX, &mRequest.index); - AddArgument("Name", &mRequest.name); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAudioOutputClusterRenameOutputParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.index = [NSNumber numberWithUnsignedChar:mRequest.index]; - params.name = [[NSString alloc] initWithBytes:mRequest.name.data() - length:mRequest.name.size() - encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster renameOutputWithParams:params - completion:^(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::AudioOutput::Commands::RenameOutput::Type mRequest; -}; - /* - * Attribute OutputList + * Attribute FeatureMap */ -class ReadAudioOutputOutputList : public ReadAttribute { +class ReadApplicationLauncherFeatureMap : public ReadAttribute { public: - ReadAudioOutputOutputList() - : ReadAttribute("output-list") + ReadApplicationLauncherFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadAudioOutputOutputList() {} + ~ReadApplicationLauncherFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeOutputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.OutputList response %@", [value description]); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("AudioOutput OutputList read Error", error); + LogNSError("ApplicationLauncher FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -73726,22 +82203,22 @@ class ReadAudioOutputOutputList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputOutputList() - : SubscribeAttribute("output-list") + SubscribeAttributeApplicationLauncherFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAudioOutputOutputList() {} + ~SubscribeAttributeApplicationLauncherFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73752,12 +82229,12 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutputListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.OutputList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73766,29 +82243,29 @@ class SubscribeAttributeAudioOutputOutputList : public SubscribeAttribute { }; /* - * Attribute CurrentOutput + * Attribute ClusterRevision */ -class ReadAudioOutputCurrentOutput : public ReadAttribute { +class ReadApplicationLauncherClusterRevision : public ReadAttribute { public: - ReadAudioOutputCurrentOutput() - : ReadAttribute("current-output") + ReadApplicationLauncherClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadAudioOutputCurrentOutput() {} + ~ReadApplicationLauncherClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentOutputWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("AudioOutput CurrentOutput read Error", error); + LogNSError("ApplicationLauncher ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -73796,22 +82273,22 @@ class ReadAudioOutputCurrentOutput : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { +class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputCurrentOutput() - : SubscribeAttribute("current-output") + SubscribeAttributeApplicationLauncherClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAudioOutputCurrentOutput() {} + ~SubscribeAttributeApplicationLauncherClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73822,12 +82299,12 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentOutputWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.CurrentOutput response %@", [value description]); + NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73835,30 +82312,54 @@ class SubscribeAttributeAudioOutputCurrentOutput : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster ApplicationBasic | 0x050D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * VendorName | 0x0000 | +| * VendorID | 0x0001 | +| * ApplicationName | 0x0002 | +| * ProductID | 0x0003 | +| * Application | 0x0004 | +| * Status | 0x0005 | +| * ApplicationVersion | 0x0006 | +| * AllowedVendorList | 0x0007 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute GeneratedCommandList + * Attribute VendorName */ -class ReadAudioOutputGeneratedCommandList : public ReadAttribute { +class ReadApplicationBasicVendorName : public ReadAttribute { public: - ReadAudioOutputGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadApplicationBasicVendorName() + : ReadAttribute("vendor-name") { } - ~ReadAudioOutputGeneratedCommandList() {} + ~ReadApplicationBasicVendorName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorName response %@", [value description]); if (error != nil) { - LogNSError("AudioOutput GeneratedCommandList read Error", error); + LogNSError("ApplicationBasic VendorName read Error", error); } SetCommandExitStatus(error); }]; @@ -73866,22 +82367,22 @@ class ReadAudioOutputGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeApplicationBasicVendorName() + : SubscribeAttribute("vendor-name") { } - ~SubscribeAttributeAudioOutputGeneratedCommandList() {} + ~SubscribeAttributeApplicationBasicVendorName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73892,12 +82393,12 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorName response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73906,29 +82407,29 @@ class SubscribeAttributeAudioOutputGeneratedCommandList : public SubscribeAttrib }; /* - * Attribute AcceptedCommandList + * Attribute VendorID */ -class ReadAudioOutputAcceptedCommandList : public ReadAttribute { +class ReadApplicationBasicVendorID : public ReadAttribute { public: - ReadAudioOutputAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadApplicationBasicVendorID() + : ReadAttribute("vendor-id") { } - ~ReadAudioOutputAcceptedCommandList() {} + ~ReadApplicationBasicVendorID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorID response %@", [value description]); if (error != nil) { - LogNSError("AudioOutput AcceptedCommandList read Error", error); + LogNSError("ApplicationBasic VendorID read Error", error); } SetCommandExitStatus(error); }]; @@ -73936,22 +82437,22 @@ class ReadAudioOutputAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeApplicationBasicVendorID() + : SubscribeAttribute("vendor-id") { } - ~SubscribeAttributeAudioOutputAcceptedCommandList() {} + ~SubscribeAttributeApplicationBasicVendorID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -73962,12 +82463,12 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.VendorID response %@", [value description]); SetCommandExitStatus(error); }]; @@ -73976,29 +82477,29 @@ class SubscribeAttributeAudioOutputAcceptedCommandList : public SubscribeAttribu }; /* - * Attribute AttributeList + * Attribute ApplicationName */ -class ReadAudioOutputAttributeList : public ReadAttribute { +class ReadApplicationBasicApplicationName : public ReadAttribute { public: - ReadAudioOutputAttributeList() - : ReadAttribute("attribute-list") + ReadApplicationBasicApplicationName() + : ReadAttribute("application-name") { } - ~ReadAudioOutputAttributeList() {} + ~ReadApplicationBasicApplicationName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); if (error != nil) { - LogNSError("AudioOutput AttributeList read Error", error); + LogNSError("ApplicationBasic ApplicationName read Error", error); } SetCommandExitStatus(error); }]; @@ -74006,22 +82507,22 @@ class ReadAudioOutputAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeApplicationBasicApplicationName() + : SubscribeAttribute("application-name") { } - ~SubscribeAttributeAudioOutputAttributeList() {} + ~SubscribeAttributeApplicationBasicApplicationName() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74032,12 +82533,12 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeApplicationNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74046,29 +82547,29 @@ class SubscribeAttributeAudioOutputAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute ProductID */ -class ReadAudioOutputFeatureMap : public ReadAttribute { +class ReadApplicationBasicProductID : public ReadAttribute { public: - ReadAudioOutputFeatureMap() - : ReadAttribute("feature-map") + ReadApplicationBasicProductID() + : ReadAttribute("product-id") { } - ~ReadAudioOutputFeatureMap() {} + ~ReadApplicationBasicProductID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ProductID response %@", [value description]); if (error != nil) { - LogNSError("AudioOutput FeatureMap read Error", error); + LogNSError("ApplicationBasic ProductID read Error", error); } SetCommandExitStatus(error); }]; @@ -74076,22 +82577,22 @@ class ReadAudioOutputFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeApplicationBasicProductID() + : SubscribeAttribute("product-id") { } - ~SubscribeAttributeAudioOutputFeatureMap() {} + ~SubscribeAttributeApplicationBasicProductID() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74102,12 +82603,12 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeProductIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.FeatureMap response %@", [value description]); + NSLog(@"ApplicationBasic.ProductID response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74116,29 +82617,30 @@ class SubscribeAttributeAudioOutputFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute Application */ -class ReadAudioOutputClusterRevision : public ReadAttribute { +class ReadApplicationBasicApplication : public ReadAttribute { public: - ReadAudioOutputClusterRevision() - : ReadAttribute("cluster-revision") + ReadApplicationBasicApplication() + : ReadAttribute("application") { } - ~ReadAudioOutputClusterRevision() {} + ~ReadApplicationBasicApplication() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeApplicationWithCompletion:^( + MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Application response %@", [value description]); if (error != nil) { - LogNSError("AudioOutput ClusterRevision read Error", error); + LogNSError("ApplicationBasic Application read Error", error); } SetCommandExitStatus(error); }]; @@ -74146,22 +82648,22 @@ class ReadAudioOutputClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute { public: - SubscribeAttributeAudioOutputClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeApplicationBasicApplication() + : SubscribeAttribute("application") { } - ~SubscribeAttributeAudioOutputClusterRevision() {} + ~SubscribeAttributeApplicationBasicApplication() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050B) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000004) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAudioOutput alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74172,12 +82674,12 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeApplicationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AudioOutput.ClusterRevision response %@", [value description]); + reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Application response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74185,234 +82687,100 @@ class SubscribeAttributeAudioOutputClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster ApplicationLauncher | 0x050C | -|------------------------------------------------------------------------------| -| Commands: | | -| * LaunchApp | 0x00 | -| * StopApp | 0x01 | -| * HideApp | 0x02 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * CatalogList | 0x0000 | -| * CurrentApp | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command LaunchApp + * Attribute Status */ -class ApplicationLauncherLaunchApp : public ClusterCommand { +class ReadApplicationBasicStatus : public ReadAttribute { public: - ApplicationLauncherLaunchApp() - : ClusterCommand("launch-app") - , mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - AddArgument("Data", &mRequest.data); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadApplicationBasicStatus() + : ReadAttribute("status") { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() - length:mRequest.application.Value().applicationID.size() - encoding:NSUTF8StringEncoding]; - } else { - params.application = nil; - } - if (mRequest.data.HasValue()) { - params.data = [NSData dataWithBytes:mRequest.data.Value().data() length:mRequest.data.Value().size()]; - } else { - params.data = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, - NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type mRequest; - TypedComplexArgument> - mComplex_Application; -}; - -/* - * Command StopApp - */ -class ApplicationLauncherStopApp : public ClusterCommand { -public: - ApplicationLauncherStopApp() - : ClusterCommand("stop-app") - , mComplex_Application(&mRequest.application) - { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); - } + ~ReadApplicationBasicStatus() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterStopAppParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() - length:mRequest.application.Value().applicationID.size() - encoding:NSUTF8StringEncoding]; - } else { - params.application = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster stopAppWithParams:params - completion:^( - MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Status response %@", [value description]); + if (error != nil) { + LogNSError("ApplicationBasic Status read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::StopApp::Type mRequest; - TypedComplexArgument> - mComplex_Application; }; -/* - * Command HideApp - */ -class ApplicationLauncherHideApp : public ClusterCommand { +class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { public: - ApplicationLauncherHideApp() - : ClusterCommand("hide-app") - , mComplex_Application(&mRequest.application) + SubscribeAttributeApplicationBasicStatus() + : SubscribeAttribute("status") { - AddArgument("Application", &mComplex_Application); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeApplicationBasicStatus() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000002) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000005) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRApplicationLauncherClusterHideAppParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.application.HasValue()) { - params.application = [MTRApplicationLauncherClusterApplicationStruct new]; - params.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mRequest.application.Value().catalogVendorID]; - params.application.applicationID = [[NSString alloc] initWithBytes:mRequest.application.Value().applicationID.data() - length:mRequest.application.Value().applicationID.size() - encoding:NSUTF8StringEncoding]; - } else { - params.application = nil; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster hideAppWithParams:params - completion:^( - MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeStatusWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.Status response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ApplicationLauncher::Commands::HideApp::Type mRequest; - TypedComplexArgument> - mComplex_Application; }; /* - * Attribute CatalogList + * Attribute ApplicationVersion */ -class ReadApplicationLauncherCatalogList : public ReadAttribute { +class ReadApplicationBasicApplicationVersion : public ReadAttribute { public: - ReadApplicationLauncherCatalogList() - : ReadAttribute("catalog-list") + ReadApplicationBasicApplicationVersion() + : ReadAttribute("application-version") { } - ~ReadApplicationLauncherCatalogList() {} + ~ReadApplicationBasicApplicationVersion() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCatalogListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); if (error != nil) { - LogNSError("ApplicationLauncher CatalogList read Error", error); + LogNSError("ApplicationBasic ApplicationVersion read Error", error); } SetCommandExitStatus(error); }]; @@ -74420,22 +82788,22 @@ class ReadApplicationLauncherCatalogList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherCatalogList() - : SubscribeAttribute("catalog-list") + SubscribeAttributeApplicationBasicApplicationVersion() + : SubscribeAttribute("application-version") { } - ~SubscribeAttributeApplicationLauncherCatalogList() {} + ~SubscribeAttributeApplicationBasicApplicationVersion() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000006) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74446,12 +82814,12 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCatalogListWithParams:params + [cluster subscribeAttributeApplicationVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CatalogList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74460,30 +82828,29 @@ class SubscribeAttributeApplicationLauncherCatalogList : public SubscribeAttribu }; /* - * Attribute CurrentApp + * Attribute AllowedVendorList */ -class ReadApplicationLauncherCurrentApp : public ReadAttribute { +class ReadApplicationBasicAllowedVendorList : public ReadAttribute { public: - ReadApplicationLauncherCurrentApp() - : ReadAttribute("current-app") + ReadApplicationBasicAllowedVendorList() + : ReadAttribute("allowed-vendor-list") { } - ~ReadApplicationLauncherCurrentApp() {} + ~ReadApplicationBasicAllowedVendorList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeCurrentAppWithCompletion:^( - MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationLauncher CurrentApp read Error", error); + LogNSError("ApplicationBasic AllowedVendorList read Error", error); } SetCommandExitStatus(error); }]; @@ -74491,81 +82858,92 @@ class ReadApplicationLauncherCurrentApp : public ReadAttribute { } }; -class WriteApplicationLauncherCurrentApp : public WriteAttribute { +class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttribute { public: - WriteApplicationLauncherCurrentApp() - : WriteAttribute("current-app") - , mComplex(&mValue) + SubscribeAttributeApplicationBasicAllowedVendorList() + : SubscribeAttribute("allowed-vendor-list") { - AddArgument("attr-name", "current-app"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); } - ~WriteApplicationLauncherCurrentApp() {} + ~SubscribeAttributeApplicationBasicAllowedVendorList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) WriteAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000007) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value; - if (mValue.IsNull()) { - value = nil; - } else { - value = [MTRApplicationLauncherClusterApplicationEPStruct new]; - value.application = [MTRApplicationLauncherClusterApplicationStruct new]; - value.application.catalogVendorID = [NSNumber numberWithUnsignedShort:mValue.Value().application.catalogVendorID]; - value.application.applicationID = [[NSString alloc] initWithBytes:mValue.Value().application.applicationID.data() - length:mValue.Value().application.applicationID.size() - encoding:NSUTF8StringEncoding]; - if (mValue.Value().endpoint.HasValue()) { - value.endpoint = [NSNumber numberWithUnsignedShort:mValue.Value().endpoint.Value()]; - } else { - value.endpoint = nil; - } + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeAllowedVendorListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster writeAttributeCurrentAppWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ApplicationLauncher CurrentApp write Error", error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; -private: - chip::app::DataModel::Nullable mValue; - TypedComplexArgument< - chip::app::DataModel::Nullable> - mComplex; +/* + * Attribute GeneratedCommandList + */ +class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { +public: + ReadApplicationBasicGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadApplicationBasicGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("ApplicationBasic GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherCurrentApp() - : SubscribeAttribute("current-app") + SubscribeAttributeApplicationBasicGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeApplicationLauncherCurrentApp() {} + ~SubscribeAttributeApplicationBasicGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74576,12 +82954,12 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentAppWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRApplicationLauncherClusterApplicationEPStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.CurrentApp response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74590,29 +82968,29 @@ class SubscribeAttributeApplicationLauncherCurrentApp : public SubscribeAttribut }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { +class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { public: - ReadApplicationLauncherGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadApplicationBasicAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadApplicationLauncherGeneratedCommandList() {} + ~ReadApplicationBasicAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationLauncher GeneratedCommandList read Error", error); + LogNSError("ApplicationBasic AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -74620,22 +82998,22 @@ class ReadApplicationLauncherGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeApplicationBasicAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeApplicationLauncherGeneratedCommandList() {} + ~SubscribeAttributeApplicationBasicAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74646,12 +83024,12 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.GeneratedCommandList response %@", [value description]); + NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74660,29 +83038,29 @@ class SubscribeAttributeApplicationLauncherGeneratedCommandList : public Subscri }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { +class ReadApplicationBasicEventList : public ReadAttribute { public: - ReadApplicationLauncherAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadApplicationBasicEventList() + : ReadAttribute("event-list") { } - ~ReadApplicationLauncherAcceptedCommandList() {} + ~ReadApplicationBasicEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ApplicationBasic.EventList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationLauncher AcceptedCommandList read Error", error); + LogNSError("ApplicationBasic EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -74690,22 +83068,22 @@ class ReadApplicationLauncherAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicEventList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeApplicationBasicEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeApplicationLauncherAcceptedCommandList() {} + ~SubscribeAttributeApplicationBasicEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74716,12 +83094,12 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AcceptedCommandList response %@", [value description]); + NSLog(@"ApplicationBasic.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74732,27 +83110,27 @@ class SubscribeAttributeApplicationLauncherAcceptedCommandList : public Subscrib /* * Attribute AttributeList */ -class ReadApplicationLauncherAttributeList : public ReadAttribute { +class ReadApplicationBasicAttributeList : public ReadAttribute { public: - ReadApplicationLauncherAttributeList() + ReadApplicationBasicAttributeList() : ReadAttribute("attribute-list") { } - ~ReadApplicationLauncherAttributeList() {} + ~ReadApplicationBasicAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationLauncher AttributeList read Error", error); + LogNSError("ApplicationBasic AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -74760,22 +83138,22 @@ class ReadApplicationLauncherAttributeList : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherAttributeList() + SubscribeAttributeApplicationBasicAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeApplicationLauncherAttributeList() {} + ~SubscribeAttributeApplicationBasicAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74791,7 +83169,7 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.AttributeList response %@", [value description]); + NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74802,27 +83180,27 @@ class SubscribeAttributeApplicationLauncherAttributeList : public SubscribeAttri /* * Attribute FeatureMap */ -class ReadApplicationLauncherFeatureMap : public ReadAttribute { +class ReadApplicationBasicFeatureMap : public ReadAttribute { public: - ReadApplicationLauncherFeatureMap() + ReadApplicationBasicFeatureMap() : ReadAttribute("feature-map") { } - ~ReadApplicationLauncherFeatureMap() {} + ~ReadApplicationBasicFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); + NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ApplicationLauncher FeatureMap read Error", error); + LogNSError("ApplicationBasic FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -74830,22 +83208,22 @@ class ReadApplicationLauncherFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherFeatureMap() + SubscribeAttributeApplicationBasicFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeApplicationLauncherFeatureMap() {} + ~SubscribeAttributeApplicationBasicFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74861,7 +83239,7 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.FeatureMap response %@", [value description]); + NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74872,27 +83250,27 @@ class SubscribeAttributeApplicationLauncherFeatureMap : public SubscribeAttribut /* * Attribute ClusterRevision */ -class ReadApplicationLauncherClusterRevision : public ReadAttribute { +class ReadApplicationBasicClusterRevision : public ReadAttribute { public: - ReadApplicationLauncherClusterRevision() + ReadApplicationBasicClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadApplicationLauncherClusterRevision() {} + ~ReadApplicationBasicClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); + NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ApplicationLauncher ClusterRevision read Error", error); + LogNSError("ApplicationBasic ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -74900,22 +83278,22 @@ class ReadApplicationLauncherClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAttribute { +class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeApplicationLauncherClusterRevision() + SubscribeAttributeApplicationBasicClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeApplicationLauncherClusterRevision() {} + ~SubscribeAttributeApplicationBasicClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050C) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -74931,7 +83309,7 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationLauncher.ClusterRevision response %@", [value description]); + NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -74940,19 +83318,14 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt }; /*----------------------------------------------------------------------------*\ -| Cluster ApplicationBasic | 0x050D | +| Cluster AccountLogin | 0x050E | |------------------------------------------------------------------------------| | Commands: | | +| * GetSetupPIN | 0x00 | +| * Login | 0x02 | +| * Logout | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * VendorName | 0x0000 | -| * VendorID | 0x0001 | -| * ApplicationName | 0x0002 | -| * ProductID | 0x0003 | -| * Application | 0x0004 | -| * Status | 0x0005 | -| * ApplicationVersion | 0x0006 | -| * AllowedVendorList | 0x0007 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -74964,99 +83337,174 @@ class SubscribeAttributeApplicationLauncherClusterRevision : public SubscribeAtt \*----------------------------------------------------------------------------*/ /* - * Attribute VendorName + * Command GetSetupPIN */ -class ReadApplicationBasicVendorName : public ReadAttribute { +class AccountLoginGetSetupPIN : public ClusterCommand { public: - ReadApplicationBasicVendorName() - : ReadAttribute("vendor-name") + AccountLoginGetSetupPIN() + : ClusterCommand("get-setup-pin") { + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + ClusterCommand::AddArguments(); } - ~ReadApplicationBasicVendorName() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() + length:mRequest.tempAccountIdentifier.size() + encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getSetupPINWithParams:params + completion:^( + MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; +}; + +/* + * Command Login + */ +class AccountLoginLogin : public ClusterCommand { +public: + AccountLoginLogin() + : ClusterCommand("login") + { + AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); + AddArgument("SetupPIN", &mRequest.setupPIN); + ClusterCommand::AddArguments(); + } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorName response %@", [value description]); - if (error != nil) { - LogNSError("ApplicationBasic VendorName read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() + length:mRequest.tempAccountIdentifier.size() + encoding:NSUTF8StringEncoding]; + params.setupPIN = [[NSString alloc] initWithBytes:mRequest.setupPIN.data() + length:mRequest.setupPIN.size() + encoding:NSUTF8StringEncoding]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster loginWithParams:params + completion:^(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::AccountLogin::Commands::Login::Type mRequest; }; -class SubscribeAttributeApplicationBasicVendorName : public SubscribeAttribute { +/* + * Command Logout + */ +class AccountLoginLogout : public ClusterCommand { public: - SubscribeAttributeApplicationBasicVendorName() - : SubscribeAttribute("vendor-name") + AccountLoginLogout() + : ClusterCommand("logout") { + ClusterCommand::AddArguments(); } - ~SubscribeAttributeApplicationBasicVendorName() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRAccountLoginClusterLogoutParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster logoutWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeVendorNameWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorName response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: }; /* - * Attribute VendorID + * Attribute GeneratedCommandList */ -class ReadApplicationBasicVendorID : public ReadAttribute { +class ReadAccountLoginGeneratedCommandList : public ReadAttribute { public: - ReadApplicationBasicVendorID() - : ReadAttribute("vendor-id") + ReadAccountLoginGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadApplicationBasicVendorID() {} + ~ReadAccountLoginGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic VendorID read Error", error); + LogNSError("AccountLogin GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -75064,22 +83512,22 @@ class ReadApplicationBasicVendorID : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { +class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeAccountLoginGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeApplicationBasicVendorID() {} + ~SubscribeAttributeAccountLoginGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000001) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75090,12 +83538,12 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.VendorID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75104,29 +83552,29 @@ class SubscribeAttributeApplicationBasicVendorID : public SubscribeAttribute { }; /* - * Attribute ApplicationName + * Attribute AcceptedCommandList */ -class ReadApplicationBasicApplicationName : public ReadAttribute { +class ReadAccountLoginAcceptedCommandList : public ReadAttribute { public: - ReadApplicationBasicApplicationName() - : ReadAttribute("application-name") + ReadAccountLoginAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadApplicationBasicApplicationName() {} + ~ReadAccountLoginAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApplicationNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic ApplicationName read Error", error); + LogNSError("AccountLogin AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -75134,22 +83582,22 @@ class ReadApplicationBasicApplicationName : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttribute { +class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplicationName() - : SubscribeAttribute("application-name") + SubscribeAttributeAccountLoginAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeApplicationBasicApplicationName() {} + ~SubscribeAttributeAccountLoginAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000002) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75160,12 +83608,12 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationNameWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationName response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75174,29 +83622,29 @@ class SubscribeAttributeApplicationBasicApplicationName : public SubscribeAttrib }; /* - * Attribute ProductID + * Attribute EventList */ -class ReadApplicationBasicProductID : public ReadAttribute { +class ReadAccountLoginEventList : public ReadAttribute { public: - ReadApplicationBasicProductID() - : ReadAttribute("product-id") + ReadAccountLoginEventList() + : ReadAttribute("event-list") { } - ~ReadApplicationBasicProductID() {} + ~ReadAccountLoginEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.EventList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic ProductID read Error", error); + LogNSError("AccountLogin EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -75204,22 +83652,22 @@ class ReadApplicationBasicProductID : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { +class SubscribeAttributeAccountLoginEventList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicProductID() - : SubscribeAttribute("product-id") + SubscribeAttributeAccountLoginEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeApplicationBasicProductID() {} + ~SubscribeAttributeAccountLoginEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000003) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75230,12 +83678,12 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductIDWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ProductID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75244,30 +83692,29 @@ class SubscribeAttributeApplicationBasicProductID : public SubscribeAttribute { }; /* - * Attribute Application + * Attribute AttributeList */ -class ReadApplicationBasicApplication : public ReadAttribute { +class ReadAccountLoginAttributeList : public ReadAttribute { public: - ReadApplicationBasicApplication() - : ReadAttribute("application") + ReadAccountLoginAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadApplicationBasicApplication() {} + ~ReadAccountLoginAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApplicationWithCompletion:^( - MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Application response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic Application read Error", error); + LogNSError("AccountLogin AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -75275,22 +83722,22 @@ class ReadApplicationBasicApplication : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute { +class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplication() - : SubscribeAttribute("application") + SubscribeAttributeAccountLoginAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeApplicationBasicApplication() {} + ~SubscribeAttributeAccountLoginAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000004) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75301,12 +83748,12 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRApplicationBasicClusterApplicationStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Application response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75315,29 +83762,29 @@ class SubscribeAttributeApplicationBasicApplication : public SubscribeAttribute }; /* - * Attribute Status + * Attribute FeatureMap */ -class ReadApplicationBasicStatus : public ReadAttribute { +class ReadAccountLoginFeatureMap : public ReadAttribute { public: - ReadApplicationBasicStatus() - : ReadAttribute("status") + ReadAccountLoginFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadApplicationBasicStatus() {} + ~ReadAccountLoginFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Status response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic Status read Error", error); + LogNSError("AccountLogin FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -75345,22 +83792,22 @@ class ReadApplicationBasicStatus : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { +class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicStatus() - : SubscribeAttribute("status") + SubscribeAttributeAccountLoginFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeApplicationBasicStatus() {} + ~SubscribeAttributeAccountLoginFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000005) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75371,12 +83818,12 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStatusWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.Status response %@", [value description]); + NSLog(@"AccountLogin.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75385,29 +83832,29 @@ class SubscribeAttributeApplicationBasicStatus : public SubscribeAttribute { }; /* - * Attribute ApplicationVersion + * Attribute ClusterRevision */ -class ReadApplicationBasicApplicationVersion : public ReadAttribute { +class ReadAccountLoginClusterRevision : public ReadAttribute { public: - ReadApplicationBasicApplicationVersion() - : ReadAttribute("application-version") + ReadAccountLoginClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadApplicationBasicApplicationVersion() {} + ~ReadAccountLoginClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeApplicationVersionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic ApplicationVersion read Error", error); + LogNSError("AccountLogin ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -75415,22 +83862,22 @@ class ReadApplicationBasicApplicationVersion : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAttribute { +class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicApplicationVersion() - : SubscribeAttribute("application-version") + SubscribeAttributeAccountLoginClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeApplicationBasicApplicationVersion() {} + ~SubscribeAttributeAccountLoginClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000006) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75441,12 +83888,12 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApplicationVersionWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ApplicationVersion response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75454,100 +83901,269 @@ class SubscribeAttributeApplicationBasicApplicationVersion : public SubscribeAtt } }; +/*----------------------------------------------------------------------------*\ +| Cluster ElectricalMeasurement | 0x0B04 | +|------------------------------------------------------------------------------| +| Commands: | | +| * GetProfileInfoCommand | 0x00 | +| * GetMeasurementProfileCommand | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * MeasurementType | 0x0000 | +| * DcVoltage | 0x0100 | +| * DcVoltageMin | 0x0101 | +| * DcVoltageMax | 0x0102 | +| * DcCurrent | 0x0103 | +| * DcCurrentMin | 0x0104 | +| * DcCurrentMax | 0x0105 | +| * DcPower | 0x0106 | +| * DcPowerMin | 0x0107 | +| * DcPowerMax | 0x0108 | +| * DcVoltageMultiplier | 0x0200 | +| * DcVoltageDivisor | 0x0201 | +| * DcCurrentMultiplier | 0x0202 | +| * DcCurrentDivisor | 0x0203 | +| * DcPowerMultiplier | 0x0204 | +| * DcPowerDivisor | 0x0205 | +| * AcFrequency | 0x0300 | +| * AcFrequencyMin | 0x0301 | +| * AcFrequencyMax | 0x0302 | +| * NeutralCurrent | 0x0303 | +| * TotalActivePower | 0x0304 | +| * TotalReactivePower | 0x0305 | +| * TotalApparentPower | 0x0306 | +| * Measured1stHarmonicCurrent | 0x0307 | +| * Measured3rdHarmonicCurrent | 0x0308 | +| * Measured5thHarmonicCurrent | 0x0309 | +| * Measured7thHarmonicCurrent | 0x030A | +| * Measured9thHarmonicCurrent | 0x030B | +| * Measured11thHarmonicCurrent | 0x030C | +| * MeasuredPhase1stHarmonicCurrent | 0x030D | +| * MeasuredPhase3rdHarmonicCurrent | 0x030E | +| * MeasuredPhase5thHarmonicCurrent | 0x030F | +| * MeasuredPhase7thHarmonicCurrent | 0x0310 | +| * MeasuredPhase9thHarmonicCurrent | 0x0311 | +| * MeasuredPhase11thHarmonicCurrent | 0x0312 | +| * AcFrequencyMultiplier | 0x0400 | +| * AcFrequencyDivisor | 0x0401 | +| * PowerMultiplier | 0x0402 | +| * PowerDivisor | 0x0403 | +| * HarmonicCurrentMultiplier | 0x0404 | +| * PhaseHarmonicCurrentMultiplier | 0x0405 | +| * InstantaneousVoltage | 0x0500 | +| * InstantaneousLineCurrent | 0x0501 | +| * InstantaneousActiveCurrent | 0x0502 | +| * InstantaneousReactiveCurrent | 0x0503 | +| * InstantaneousPower | 0x0504 | +| * RmsVoltage | 0x0505 | +| * RmsVoltageMin | 0x0506 | +| * RmsVoltageMax | 0x0507 | +| * RmsCurrent | 0x0508 | +| * RmsCurrentMin | 0x0509 | +| * RmsCurrentMax | 0x050A | +| * ActivePower | 0x050B | +| * ActivePowerMin | 0x050C | +| * ActivePowerMax | 0x050D | +| * ReactivePower | 0x050E | +| * ApparentPower | 0x050F | +| * PowerFactor | 0x0510 | +| * AverageRmsVoltageMeasurementPeriod | 0x0511 | +| * AverageRmsUnderVoltageCounter | 0x0513 | +| * RmsExtremeOverVoltagePeriod | 0x0514 | +| * RmsExtremeUnderVoltagePeriod | 0x0515 | +| * RmsVoltageSagPeriod | 0x0516 | +| * RmsVoltageSwellPeriod | 0x0517 | +| * AcVoltageMultiplier | 0x0600 | +| * AcVoltageDivisor | 0x0601 | +| * AcCurrentMultiplier | 0x0602 | +| * AcCurrentDivisor | 0x0603 | +| * AcPowerMultiplier | 0x0604 | +| * AcPowerDivisor | 0x0605 | +| * OverloadAlarmsMask | 0x0700 | +| * VoltageOverload | 0x0701 | +| * CurrentOverload | 0x0702 | +| * AcOverloadAlarmsMask | 0x0800 | +| * AcVoltageOverload | 0x0801 | +| * AcCurrentOverload | 0x0802 | +| * AcActivePowerOverload | 0x0803 | +| * AcReactivePowerOverload | 0x0804 | +| * AverageRmsOverVoltage | 0x0805 | +| * AverageRmsUnderVoltage | 0x0806 | +| * RmsExtremeOverVoltage | 0x0807 | +| * RmsExtremeUnderVoltage | 0x0808 | +| * RmsVoltageSag | 0x0809 | +| * RmsVoltageSwell | 0x080A | +| * LineCurrentPhaseB | 0x0901 | +| * ActiveCurrentPhaseB | 0x0902 | +| * ReactiveCurrentPhaseB | 0x0903 | +| * RmsVoltagePhaseB | 0x0905 | +| * RmsVoltageMinPhaseB | 0x0906 | +| * RmsVoltageMaxPhaseB | 0x0907 | +| * RmsCurrentPhaseB | 0x0908 | +| * RmsCurrentMinPhaseB | 0x0909 | +| * RmsCurrentMaxPhaseB | 0x090A | +| * ActivePowerPhaseB | 0x090B | +| * ActivePowerMinPhaseB | 0x090C | +| * ActivePowerMaxPhaseB | 0x090D | +| * ReactivePowerPhaseB | 0x090E | +| * ApparentPowerPhaseB | 0x090F | +| * PowerFactorPhaseB | 0x0910 | +| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | +| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | +| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | +| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | +| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | +| * RmsVoltageSagPeriodPhaseB | 0x0916 | +| * RmsVoltageSwellPeriodPhaseB | 0x0917 | +| * LineCurrentPhaseC | 0x0A01 | +| * ActiveCurrentPhaseC | 0x0A02 | +| * ReactiveCurrentPhaseC | 0x0A03 | +| * RmsVoltagePhaseC | 0x0A05 | +| * RmsVoltageMinPhaseC | 0x0A06 | +| * RmsVoltageMaxPhaseC | 0x0A07 | +| * RmsCurrentPhaseC | 0x0A08 | +| * RmsCurrentMinPhaseC | 0x0A09 | +| * RmsCurrentMaxPhaseC | 0x0A0A | +| * ActivePowerPhaseC | 0x0A0B | +| * ActivePowerMinPhaseC | 0x0A0C | +| * ActivePowerMaxPhaseC | 0x0A0D | +| * ReactivePowerPhaseC | 0x0A0E | +| * ApparentPowerPhaseC | 0x0A0F | +| * PowerFactorPhaseC | 0x0A10 | +| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | +| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | +| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | +| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | +| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | +| * RmsVoltageSagPeriodPhaseC | 0x0A16 | +| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AllowedVendorList + * Command GetProfileInfoCommand */ -class ReadApplicationBasicAllowedVendorList : public ReadAttribute { +class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { public: - ReadApplicationBasicAllowedVendorList() - : ReadAttribute("allowed-vendor-list") + ElectricalMeasurementGetProfileInfoCommand() + : ClusterCommand("get-profile-info-command") { + ClusterCommand::AddArguments(); } - ~ReadApplicationBasicAllowedVendorList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAllowedVendorListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); - if (error != nil) { - LogNSError("ApplicationBasic AllowedVendorList read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getProfileInfoCommandWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeApplicationBasicAllowedVendorList : public SubscribeAttribute { +/* + * Command GetMeasurementProfileCommand + */ +class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand { public: - SubscribeAttributeApplicationBasicAllowedVendorList() - : SubscribeAttribute("allowed-vendor-list") + ElectricalMeasurementGetMeasurementProfileCommand() + : ClusterCommand("get-measurement-profile-command") { + AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); + AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); + AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeApplicationBasicAllowedVendorList() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x00000007) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.attributeId = [NSNumber numberWithUnsignedShort:mRequest.attributeId]; + params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime]; + params.numberOfIntervals = [NSNumber numberWithUnsignedChar:mRequest.numberOfIntervals]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getMeasurementProfileCommandWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAllowedVendorListWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AllowedVendorList response %@", [value description]); - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Attribute MeasurementType */ -class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { +class ReadElectricalMeasurementMeasurementType : public ReadAttribute { public: - ReadApplicationBasicGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadElectricalMeasurementMeasurementType() + : ReadAttribute("measurement-type") { } - ~ReadApplicationBasicGeneratedCommandList() {} + ~ReadElectricalMeasurementMeasurementType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic GeneratedCommandList read Error", error); + LogNSError("ElectricalMeasurement MeasurementType read Error", error); } SetCommandExitStatus(error); }]; @@ -75555,22 +84171,22 @@ class ReadApplicationBasicGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeElectricalMeasurementMeasurementType() + : SubscribeAttribute("measurement-type") { } - ~SubscribeAttributeApplicationBasicGeneratedCommandList() {} + ~SubscribeAttributeElectricalMeasurementMeasurementType() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75581,12 +84197,12 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeMeasurementTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75595,29 +84211,29 @@ class SubscribeAttributeApplicationBasicGeneratedCommandList : public SubscribeA }; /* - * Attribute AcceptedCommandList + * Attribute DcVoltage */ -class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { +class ReadElectricalMeasurementDcVoltage : public ReadAttribute { public: - ReadApplicationBasicAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadElectricalMeasurementDcVoltage() + : ReadAttribute("dc-voltage") { } - ~ReadApplicationBasicAcceptedCommandList() {} + ~ReadElectricalMeasurementDcVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000100) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic AcceptedCommandList read Error", error); + LogNSError("ElectricalMeasurement DcVoltage read Error", error); } SetCommandExitStatus(error); }]; @@ -75625,22 +84241,22 @@ class ReadApplicationBasicAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeElectricalMeasurementDcVoltage() + : SubscribeAttribute("dc-voltage") { } - ~SubscribeAttributeApplicationBasicAcceptedCommandList() {} + ~SubscribeAttributeElectricalMeasurementDcVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000100) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75651,12 +84267,12 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeDcVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75665,29 +84281,29 @@ class SubscribeAttributeApplicationBasicAcceptedCommandList : public SubscribeAt }; /* - * Attribute AttributeList + * Attribute DcVoltageMin */ -class ReadApplicationBasicAttributeList : public ReadAttribute { +class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { public: - ReadApplicationBasicAttributeList() - : ReadAttribute("attribute-list") + ReadElectricalMeasurementDcVoltageMin() + : ReadAttribute("dc-voltage-min") { } - ~ReadApplicationBasicAttributeList() {} + ~ReadElectricalMeasurementDcVoltageMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000101) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic AttributeList read Error", error); + LogNSError("ElectricalMeasurement DcVoltageMin read Error", error); } SetCommandExitStatus(error); }]; @@ -75695,22 +84311,22 @@ class ReadApplicationBasicAttributeList : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeElectricalMeasurementDcVoltageMin() + : SubscribeAttribute("dc-voltage-min") { } - ~SubscribeAttributeApplicationBasicAttributeList() {} + ~SubscribeAttributeElectricalMeasurementDcVoltageMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000101) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75721,12 +84337,12 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeDcVoltageMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75735,29 +84351,29 @@ class SubscribeAttributeApplicationBasicAttributeList : public SubscribeAttribut }; /* - * Attribute FeatureMap + * Attribute DcVoltageMax */ -class ReadApplicationBasicFeatureMap : public ReadAttribute { +class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { public: - ReadApplicationBasicFeatureMap() - : ReadAttribute("feature-map") + ReadElectricalMeasurementDcVoltageMax() + : ReadAttribute("dc-voltage-max") { } - ~ReadApplicationBasicFeatureMap() {} + ~ReadElectricalMeasurementDcVoltageMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000102) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic FeatureMap read Error", error); + LogNSError("ElectricalMeasurement DcVoltageMax read Error", error); } SetCommandExitStatus(error); }]; @@ -75765,22 +84381,22 @@ class ReadApplicationBasicFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeElectricalMeasurementDcVoltageMax() + : SubscribeAttribute("dc-voltage-max") { } - ~SubscribeAttributeApplicationBasicFeatureMap() {} + ~SubscribeAttributeElectricalMeasurementDcVoltageMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000102) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75791,12 +84407,12 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeDcVoltageMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.FeatureMap response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75805,29 +84421,29 @@ class SubscribeAttributeApplicationBasicFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute DcCurrent */ -class ReadApplicationBasicClusterRevision : public ReadAttribute { +class ReadElectricalMeasurementDcCurrent : public ReadAttribute { public: - ReadApplicationBasicClusterRevision() - : ReadAttribute("cluster-revision") + ReadElectricalMeasurementDcCurrent() + : ReadAttribute("dc-current") { } - ~ReadApplicationBasicClusterRevision() {} + ~ReadElectricalMeasurementDcCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000103) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); if (error != nil) { - LogNSError("ApplicationBasic ClusterRevision read Error", error); + LogNSError("ElectricalMeasurement DcCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -75835,22 +84451,22 @@ class ReadApplicationBasicClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribute { public: - SubscribeAttributeApplicationBasicClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeElectricalMeasurementDcCurrent() + : SubscribeAttribute("dc-current") { } - ~SubscribeAttributeApplicationBasicClusterRevision() {} + ~SubscribeAttributeElectricalMeasurementDcCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050D) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000103) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterApplicationBasic alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -75861,12 +84477,12 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeDcCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ApplicationBasic.ClusterRevision response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -75874,194 +84490,30 @@ class SubscribeAttributeApplicationBasicClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster AccountLogin | 0x050E | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetSetupPIN | 0x00 | -| * Login | 0x02 | -| * Logout | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command GetSetupPIN - */ -class AccountLoginGetSetupPIN : public ClusterCommand { -public: - AccountLoginGetSetupPIN() - : ClusterCommand("get-setup-pin") - { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() - length:mRequest.tempAccountIdentifier.size() - encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getSetupPINWithParams:params - completion:^( - MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type mRequest; -}; - -/* - * Command Login - */ -class AccountLoginLogin : public ClusterCommand { -public: - AccountLoginLogin() - : ClusterCommand("login") - { - AddArgument("TempAccountIdentifier", &mRequest.tempAccountIdentifier); - AddArgument("SetupPIN", &mRequest.setupPIN); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.tempAccountIdentifier = [[NSString alloc] initWithBytes:mRequest.tempAccountIdentifier.data() - length:mRequest.tempAccountIdentifier.size() - encoding:NSUTF8StringEncoding]; - params.setupPIN = [[NSString alloc] initWithBytes:mRequest.setupPIN.data() - length:mRequest.setupPIN.size() - encoding:NSUTF8StringEncoding]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster loginWithParams:params - completion:^(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::AccountLogin::Commands::Login::Type mRequest; -}; - -/* - * Command Logout - */ -class AccountLoginLogout : public ClusterCommand { -public: - AccountLoginLogout() - : ClusterCommand("logout") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRAccountLoginClusterLogoutParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster logoutWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - /* - * Attribute GeneratedCommandList + * Attribute DcCurrentMin */ -class ReadAccountLoginGeneratedCommandList : public ReadAttribute { +class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { public: - ReadAccountLoginGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadElectricalMeasurementDcCurrentMin() + : ReadAttribute("dc-current-min") { } - ~ReadAccountLoginGeneratedCommandList() {} + ~ReadElectricalMeasurementDcCurrentMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000104) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); if (error != nil) { - LogNSError("AccountLogin GeneratedCommandList read Error", error); + LogNSError("ElectricalMeasurement DcCurrentMin read Error", error); } SetCommandExitStatus(error); }]; @@ -76069,22 +84521,22 @@ class ReadAccountLoginGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeElectricalMeasurementDcCurrentMin() + : SubscribeAttribute("dc-current-min") { } - ~SubscribeAttributeAccountLoginGeneratedCommandList() {} + ~SubscribeAttributeElectricalMeasurementDcCurrentMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000104) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76095,12 +84547,12 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeDcCurrentMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76109,29 +84561,29 @@ class SubscribeAttributeAccountLoginGeneratedCommandList : public SubscribeAttri }; /* - * Attribute AcceptedCommandList + * Attribute DcCurrentMax */ -class ReadAccountLoginAcceptedCommandList : public ReadAttribute { +class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { public: - ReadAccountLoginAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadElectricalMeasurementDcCurrentMax() + : ReadAttribute("dc-current-max") { } - ~ReadAccountLoginAcceptedCommandList() {} + ~ReadElectricalMeasurementDcCurrentMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000105) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); if (error != nil) { - LogNSError("AccountLogin AcceptedCommandList read Error", error); + LogNSError("ElectricalMeasurement DcCurrentMax read Error", error); } SetCommandExitStatus(error); }]; @@ -76139,22 +84591,22 @@ class ReadAccountLoginAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeElectricalMeasurementDcCurrentMax() + : SubscribeAttribute("dc-current-max") { } - ~SubscribeAttributeAccountLoginAcceptedCommandList() {} + ~SubscribeAttributeElectricalMeasurementDcCurrentMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000105) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76165,12 +84617,12 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeDcCurrentMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76179,29 +84631,29 @@ class SubscribeAttributeAccountLoginAcceptedCommandList : public SubscribeAttrib }; /* - * Attribute AttributeList + * Attribute DcPower */ -class ReadAccountLoginAttributeList : public ReadAttribute { +class ReadElectricalMeasurementDcPower : public ReadAttribute { public: - ReadAccountLoginAttributeList() - : ReadAttribute("attribute-list") + ReadElectricalMeasurementDcPower() + : ReadAttribute("dc-power") { } - ~ReadAccountLoginAttributeList() {} + ~ReadElectricalMeasurementDcPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000106) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); if (error != nil) { - LogNSError("AccountLogin AttributeList read Error", error); + LogNSError("ElectricalMeasurement DcPower read Error", error); } SetCommandExitStatus(error); }]; @@ -76209,22 +84661,22 @@ class ReadAccountLoginAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeElectricalMeasurementDcPower() + : SubscribeAttribute("dc-power") { } - ~SubscribeAttributeAccountLoginAttributeList() {} + ~SubscribeAttributeElectricalMeasurementDcPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000106) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76235,12 +84687,12 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeDcPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76249,29 +84701,29 @@ class SubscribeAttributeAccountLoginAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute DcPowerMin */ -class ReadAccountLoginFeatureMap : public ReadAttribute { +class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { public: - ReadAccountLoginFeatureMap() - : ReadAttribute("feature-map") + ReadElectricalMeasurementDcPowerMin() + : ReadAttribute("dc-power-min") { } - ~ReadAccountLoginFeatureMap() {} + ~ReadElectricalMeasurementDcPowerMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000107) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcPowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); if (error != nil) { - LogNSError("AccountLogin FeatureMap read Error", error); + LogNSError("ElectricalMeasurement DcPowerMin read Error", error); } SetCommandExitStatus(error); }]; @@ -76279,22 +84731,22 @@ class ReadAccountLoginFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeElectricalMeasurementDcPowerMin() + : SubscribeAttribute("dc-power-min") { } - ~SubscribeAttributeAccountLoginFeatureMap() {} + ~SubscribeAttributeElectricalMeasurementDcPowerMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000107) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76305,12 +84757,12 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeDcPowerMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.FeatureMap response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76319,29 +84771,29 @@ class SubscribeAttributeAccountLoginFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute DcPowerMax */ -class ReadAccountLoginClusterRevision : public ReadAttribute { +class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { public: - ReadAccountLoginClusterRevision() - : ReadAttribute("cluster-revision") + ReadElectricalMeasurementDcPowerMax() + : ReadAttribute("dc-power-max") { } - ~ReadAccountLoginClusterRevision() {} + ~ReadElectricalMeasurementDcPowerMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000108) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeDcPowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); if (error != nil) { - LogNSError("AccountLogin ClusterRevision read Error", error); + LogNSError("ElectricalMeasurement DcPowerMax read Error", error); } SetCommandExitStatus(error); }]; @@ -76349,22 +84801,22 @@ class ReadAccountLoginClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttribute { public: - SubscribeAttributeAccountLoginClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeElectricalMeasurementDcPowerMax() + : SubscribeAttribute("dc-power-max") { } - ~SubscribeAttributeAccountLoginClusterRevision() {} + ~SubscribeAttributeElectricalMeasurementDcPowerMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x0000050E) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000108) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -76375,12 +84827,12 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeDcPowerMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AccountLogin.ClusterRevision response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76388,269 +84840,100 @@ class SubscribeAttributeAccountLoginClusterRevision : public SubscribeAttribute } }; -/*----------------------------------------------------------------------------*\ -| Cluster ElectricalMeasurement | 0x0B04 | -|------------------------------------------------------------------------------| -| Commands: | | -| * GetProfileInfoCommand | 0x00 | -| * GetMeasurementProfileCommand | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * MeasurementType | 0x0000 | -| * DcVoltage | 0x0100 | -| * DcVoltageMin | 0x0101 | -| * DcVoltageMax | 0x0102 | -| * DcCurrent | 0x0103 | -| * DcCurrentMin | 0x0104 | -| * DcCurrentMax | 0x0105 | -| * DcPower | 0x0106 | -| * DcPowerMin | 0x0107 | -| * DcPowerMax | 0x0108 | -| * DcVoltageMultiplier | 0x0200 | -| * DcVoltageDivisor | 0x0201 | -| * DcCurrentMultiplier | 0x0202 | -| * DcCurrentDivisor | 0x0203 | -| * DcPowerMultiplier | 0x0204 | -| * DcPowerDivisor | 0x0205 | -| * AcFrequency | 0x0300 | -| * AcFrequencyMin | 0x0301 | -| * AcFrequencyMax | 0x0302 | -| * NeutralCurrent | 0x0303 | -| * TotalActivePower | 0x0304 | -| * TotalReactivePower | 0x0305 | -| * TotalApparentPower | 0x0306 | -| * Measured1stHarmonicCurrent | 0x0307 | -| * Measured3rdHarmonicCurrent | 0x0308 | -| * Measured5thHarmonicCurrent | 0x0309 | -| * Measured7thHarmonicCurrent | 0x030A | -| * Measured9thHarmonicCurrent | 0x030B | -| * Measured11thHarmonicCurrent | 0x030C | -| * MeasuredPhase1stHarmonicCurrent | 0x030D | -| * MeasuredPhase3rdHarmonicCurrent | 0x030E | -| * MeasuredPhase5thHarmonicCurrent | 0x030F | -| * MeasuredPhase7thHarmonicCurrent | 0x0310 | -| * MeasuredPhase9thHarmonicCurrent | 0x0311 | -| * MeasuredPhase11thHarmonicCurrent | 0x0312 | -| * AcFrequencyMultiplier | 0x0400 | -| * AcFrequencyDivisor | 0x0401 | -| * PowerMultiplier | 0x0402 | -| * PowerDivisor | 0x0403 | -| * HarmonicCurrentMultiplier | 0x0404 | -| * PhaseHarmonicCurrentMultiplier | 0x0405 | -| * InstantaneousVoltage | 0x0500 | -| * InstantaneousLineCurrent | 0x0501 | -| * InstantaneousActiveCurrent | 0x0502 | -| * InstantaneousReactiveCurrent | 0x0503 | -| * InstantaneousPower | 0x0504 | -| * RmsVoltage | 0x0505 | -| * RmsVoltageMin | 0x0506 | -| * RmsVoltageMax | 0x0507 | -| * RmsCurrent | 0x0508 | -| * RmsCurrentMin | 0x0509 | -| * RmsCurrentMax | 0x050A | -| * ActivePower | 0x050B | -| * ActivePowerMin | 0x050C | -| * ActivePowerMax | 0x050D | -| * ReactivePower | 0x050E | -| * ApparentPower | 0x050F | -| * PowerFactor | 0x0510 | -| * AverageRmsVoltageMeasurementPeriod | 0x0511 | -| * AverageRmsUnderVoltageCounter | 0x0513 | -| * RmsExtremeOverVoltagePeriod | 0x0514 | -| * RmsExtremeUnderVoltagePeriod | 0x0515 | -| * RmsVoltageSagPeriod | 0x0516 | -| * RmsVoltageSwellPeriod | 0x0517 | -| * AcVoltageMultiplier | 0x0600 | -| * AcVoltageDivisor | 0x0601 | -| * AcCurrentMultiplier | 0x0602 | -| * AcCurrentDivisor | 0x0603 | -| * AcPowerMultiplier | 0x0604 | -| * AcPowerDivisor | 0x0605 | -| * OverloadAlarmsMask | 0x0700 | -| * VoltageOverload | 0x0701 | -| * CurrentOverload | 0x0702 | -| * AcOverloadAlarmsMask | 0x0800 | -| * AcVoltageOverload | 0x0801 | -| * AcCurrentOverload | 0x0802 | -| * AcActivePowerOverload | 0x0803 | -| * AcReactivePowerOverload | 0x0804 | -| * AverageRmsOverVoltage | 0x0805 | -| * AverageRmsUnderVoltage | 0x0806 | -| * RmsExtremeOverVoltage | 0x0807 | -| * RmsExtremeUnderVoltage | 0x0808 | -| * RmsVoltageSag | 0x0809 | -| * RmsVoltageSwell | 0x080A | -| * LineCurrentPhaseB | 0x0901 | -| * ActiveCurrentPhaseB | 0x0902 | -| * ReactiveCurrentPhaseB | 0x0903 | -| * RmsVoltagePhaseB | 0x0905 | -| * RmsVoltageMinPhaseB | 0x0906 | -| * RmsVoltageMaxPhaseB | 0x0907 | -| * RmsCurrentPhaseB | 0x0908 | -| * RmsCurrentMinPhaseB | 0x0909 | -| * RmsCurrentMaxPhaseB | 0x090A | -| * ActivePowerPhaseB | 0x090B | -| * ActivePowerMinPhaseB | 0x090C | -| * ActivePowerMaxPhaseB | 0x090D | -| * ReactivePowerPhaseB | 0x090E | -| * ApparentPowerPhaseB | 0x090F | -| * PowerFactorPhaseB | 0x0910 | -| * AverageRmsVoltageMeasurementPeriodPhaseB | 0x0911 | -| * AverageRmsOverVoltageCounterPhaseB | 0x0912 | -| * AverageRmsUnderVoltageCounterPhaseB | 0x0913 | -| * RmsExtremeOverVoltagePeriodPhaseB | 0x0914 | -| * RmsExtremeUnderVoltagePeriodPhaseB | 0x0915 | -| * RmsVoltageSagPeriodPhaseB | 0x0916 | -| * RmsVoltageSwellPeriodPhaseB | 0x0917 | -| * LineCurrentPhaseC | 0x0A01 | -| * ActiveCurrentPhaseC | 0x0A02 | -| * ReactiveCurrentPhaseC | 0x0A03 | -| * RmsVoltagePhaseC | 0x0A05 | -| * RmsVoltageMinPhaseC | 0x0A06 | -| * RmsVoltageMaxPhaseC | 0x0A07 | -| * RmsCurrentPhaseC | 0x0A08 | -| * RmsCurrentMinPhaseC | 0x0A09 | -| * RmsCurrentMaxPhaseC | 0x0A0A | -| * ActivePowerPhaseC | 0x0A0B | -| * ActivePowerMinPhaseC | 0x0A0C | -| * ActivePowerMaxPhaseC | 0x0A0D | -| * ReactivePowerPhaseC | 0x0A0E | -| * ApparentPowerPhaseC | 0x0A0F | -| * PowerFactorPhaseC | 0x0A10 | -| * AverageRmsVoltageMeasurementPeriodPhaseC | 0x0A11 | -| * AverageRmsOverVoltageCounterPhaseC | 0x0A12 | -| * AverageRmsUnderVoltageCounterPhaseC | 0x0A13 | -| * RmsExtremeOverVoltagePeriodPhaseC | 0x0A14 | -| * RmsExtremeUnderVoltagePeriodPhaseC | 0x0A15 | -| * RmsVoltageSagPeriodPhaseC | 0x0A16 | -| * RmsVoltageSwellPeriodPhaseC | 0x0A17 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command GetProfileInfoCommand + * Attribute DcVoltageMultiplier */ -class ElectricalMeasurementGetProfileInfoCommand : public ClusterCommand { +class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { public: - ElectricalMeasurementGetProfileInfoCommand() - : ClusterCommand("get-profile-info-command") + ReadElectricalMeasurementDcVoltageMultiplier() + : ReadAttribute("dc-voltage-multiplier") { - ClusterCommand::AddArguments(); } + ~ReadElectricalMeasurementDcVoltageMultiplier() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000200) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRElectricalMeasurementClusterGetProfileInfoCommandParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getProfileInfoCommandWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + [cluster readAttributeDcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement DcVoltageMultiplier read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Command GetMeasurementProfileCommand - */ -class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand { +class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public SubscribeAttribute { public: - ElectricalMeasurementGetMeasurementProfileCommand() - : ClusterCommand("get-measurement-profile-command") + SubscribeAttributeElectricalMeasurementDcVoltageMultiplier() + : SubscribeAttribute("dc-voltage-multiplier") { - AddArgument("AttributeId", 0, UINT16_MAX, &mRequest.attributeId); - AddArgument("StartTime", 0, UINT32_MAX, &mRequest.startTime); - AddArgument("NumberOfIntervals", 0, UINT8_MAX, &mRequest.numberOfIntervals); - ClusterCommand::AddArguments(); } + ~SubscribeAttributeElectricalMeasurementDcVoltageMultiplier() {} + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) command (0x00000001) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000200) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRElectricalMeasurementClusterGetMeasurementProfileCommandParams alloc] init]; - params.timedInvokeTimeoutMs - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.attributeId = [NSNumber numberWithUnsignedShort:mRequest.attributeId]; - params.startTime = [NSNumber numberWithUnsignedInt:mRequest.startTime]; - params.numberOfIntervals = [NSNumber numberWithUnsignedChar:mRequest.numberOfIntervals]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getMeasurementProfileCommandWithParams:params - completion:^(NSError * _Nullable error) { - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeDcVoltageMultiplierWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::ElectricalMeasurement::Commands::GetMeasurementProfileCommand::Type mRequest; }; /* - * Attribute MeasurementType + * Attribute DcVoltageDivisor */ -class ReadElectricalMeasurementMeasurementType : public ReadAttribute { +class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { public: - ReadElectricalMeasurementMeasurementType() - : ReadAttribute("measurement-type") + ReadElectricalMeasurementDcVoltageDivisor() + : ReadAttribute("dc-voltage-divisor") { } - ~ReadElectricalMeasurementMeasurementType() {} + ~ReadElectricalMeasurementDcVoltageDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000201) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasurementTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); + [cluster readAttributeDcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement MeasurementType read Error", error); + LogNSError("ElectricalMeasurement DcVoltageDivisor read Error", error); } SetCommandExitStatus(error); }]; @@ -76658,18 +84941,18 @@ class ReadElectricalMeasurementMeasurementType : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasurementType() - : SubscribeAttribute("measurement-type") + SubscribeAttributeElectricalMeasurementDcVoltageDivisor() + : SubscribeAttribute("dc-voltage-divisor") { } - ~SubscribeAttributeElectricalMeasurementMeasurementType() {} + ~SubscribeAttributeElectricalMeasurementDcVoltageDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000000) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000201) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -76684,12 +84967,12 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasurementTypeWithParams:params + [cluster subscribeAttributeDcVoltageDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasurementType response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76698,29 +84981,29 @@ class SubscribeAttributeElectricalMeasurementMeasurementType : public SubscribeA }; /* - * Attribute DcVoltage + * Attribute DcCurrentMultiplier */ -class ReadElectricalMeasurementDcVoltage : public ReadAttribute { +class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltage() - : ReadAttribute("dc-voltage") + ReadElectricalMeasurementDcCurrentMultiplier() + : ReadAttribute("dc-current-multiplier") { } - ~ReadElectricalMeasurementDcVoltage() {} + ~ReadElectricalMeasurementDcCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000100) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000202) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); + [cluster readAttributeDcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcVoltage read Error", error); + LogNSError("ElectricalMeasurement DcCurrentMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -76728,18 +85011,18 @@ class ReadElectricalMeasurementDcVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltage() - : SubscribeAttribute("dc-voltage") + SubscribeAttributeElectricalMeasurementDcCurrentMultiplier() + : SubscribeAttribute("dc-current-multiplier") { } - ~SubscribeAttributeElectricalMeasurementDcVoltage() {} + ~SubscribeAttributeElectricalMeasurementDcCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000100) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000202) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -76754,12 +85037,12 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageWithParams:params + [cluster subscribeAttributeDcCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltage response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76768,29 +85051,29 @@ class SubscribeAttributeElectricalMeasurementDcVoltage : public SubscribeAttribu }; /* - * Attribute DcVoltageMin + * Attribute DcCurrentDivisor */ -class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { +class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageMin() - : ReadAttribute("dc-voltage-min") + ReadElectricalMeasurementDcCurrentDivisor() + : ReadAttribute("dc-current-divisor") { } - ~ReadElectricalMeasurementDcVoltageMin() {} + ~ReadElectricalMeasurementDcCurrentDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000101) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000203) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); + [cluster readAttributeDcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcVoltageMin read Error", error); + LogNSError("ElectricalMeasurement DcCurrentDivisor read Error", error); } SetCommandExitStatus(error); }]; @@ -76798,18 +85081,18 @@ class ReadElectricalMeasurementDcVoltageMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageMin() - : SubscribeAttribute("dc-voltage-min") + SubscribeAttributeElectricalMeasurementDcCurrentDivisor() + : SubscribeAttribute("dc-current-divisor") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageMin() {} + ~SubscribeAttributeElectricalMeasurementDcCurrentDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000101) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000203) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -76824,12 +85107,12 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageMinWithParams:params + [cluster subscribeAttributeDcCurrentDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMin response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76838,29 +85121,29 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMin : public SubscribeAttr }; /* - * Attribute DcVoltageMax + * Attribute DcPowerMultiplier */ -class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { +class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageMax() - : ReadAttribute("dc-voltage-max") + ReadElectricalMeasurementDcPowerMultiplier() + : ReadAttribute("dc-power-multiplier") { } - ~ReadElectricalMeasurementDcVoltageMax() {} + ~ReadElectricalMeasurementDcPowerMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000102) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000204) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); + [cluster readAttributeDcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcVoltageMax read Error", error); + LogNSError("ElectricalMeasurement DcPowerMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -76868,18 +85151,18 @@ class ReadElectricalMeasurementDcVoltageMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageMax() - : SubscribeAttribute("dc-voltage-max") + SubscribeAttributeElectricalMeasurementDcPowerMultiplier() + : SubscribeAttribute("dc-power-multiplier") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageMax() {} + ~SubscribeAttributeElectricalMeasurementDcPowerMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000102) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000204) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -76894,12 +85177,12 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageMaxWithParams:params + [cluster subscribeAttributeDcPowerMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMax response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76908,29 +85191,29 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMax : public SubscribeAttr }; /* - * Attribute DcCurrent + * Attribute DcPowerDivisor */ -class ReadElectricalMeasurementDcCurrent : public ReadAttribute { +class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrent() - : ReadAttribute("dc-current") + ReadElectricalMeasurementDcPowerDivisor() + : ReadAttribute("dc-power-divisor") { } - ~ReadElectricalMeasurementDcCurrent() {} + ~ReadElectricalMeasurementDcPowerDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000103) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000205) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); + [cluster readAttributeDcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcCurrent read Error", error); + LogNSError("ElectricalMeasurement DcPowerDivisor read Error", error); } SetCommandExitStatus(error); }]; @@ -76938,18 +85221,18 @@ class ReadElectricalMeasurementDcCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrent() - : SubscribeAttribute("dc-current") + SubscribeAttributeElectricalMeasurementDcPowerDivisor() + : SubscribeAttribute("dc-power-divisor") { } - ~SubscribeAttributeElectricalMeasurementDcCurrent() {} + ~SubscribeAttributeElectricalMeasurementDcPowerDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000103) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000205) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -76964,12 +85247,12 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentWithParams:params + [cluster subscribeAttributeDcPowerDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -76978,29 +85261,29 @@ class SubscribeAttributeElectricalMeasurementDcCurrent : public SubscribeAttribu }; /* - * Attribute DcCurrentMin + * Attribute AcFrequency */ -class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { +class ReadElectricalMeasurementAcFrequency : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentMin() - : ReadAttribute("dc-current-min") + ReadElectricalMeasurementAcFrequency() + : ReadAttribute("ac-frequency") { } - ~ReadElectricalMeasurementDcCurrentMin() {} + ~ReadElectricalMeasurementAcFrequency() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000104) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000300) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); + [cluster readAttributeAcFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcCurrentMin read Error", error); + LogNSError("ElectricalMeasurement AcFrequency read Error", error); } SetCommandExitStatus(error); }]; @@ -77008,18 +85291,18 @@ class ReadElectricalMeasurementDcCurrentMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentMin() - : SubscribeAttribute("dc-current-min") + SubscribeAttributeElectricalMeasurementAcFrequency() + : SubscribeAttribute("ac-frequency") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentMin() {} + ~SubscribeAttributeElectricalMeasurementAcFrequency() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000104) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000300) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77034,12 +85317,12 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentMinWithParams:params + [cluster subscribeAttributeAcFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMin response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77048,29 +85331,29 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMin : public SubscribeAttr }; /* - * Attribute DcCurrentMax + * Attribute AcFrequencyMin */ -class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { +class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentMax() - : ReadAttribute("dc-current-max") + ReadElectricalMeasurementAcFrequencyMin() + : ReadAttribute("ac-frequency-min") { } - ~ReadElectricalMeasurementDcCurrentMax() {} + ~ReadElectricalMeasurementAcFrequencyMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000105) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000301) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); + [cluster readAttributeAcFrequencyMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcCurrentMax read Error", error); + LogNSError("ElectricalMeasurement AcFrequencyMin read Error", error); } SetCommandExitStatus(error); }]; @@ -77078,18 +85361,18 @@ class ReadElectricalMeasurementDcCurrentMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentMax() - : SubscribeAttribute("dc-current-max") + SubscribeAttributeElectricalMeasurementAcFrequencyMin() + : SubscribeAttribute("ac-frequency-min") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentMax() {} + ~SubscribeAttributeElectricalMeasurementAcFrequencyMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000105) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000301) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77104,12 +85387,12 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentMaxWithParams:params + [cluster subscribeAttributeAcFrequencyMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMax response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77118,29 +85401,29 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMax : public SubscribeAttr }; /* - * Attribute DcPower + * Attribute AcFrequencyMax */ -class ReadElectricalMeasurementDcPower : public ReadAttribute { +class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { public: - ReadElectricalMeasurementDcPower() - : ReadAttribute("dc-power") + ReadElectricalMeasurementAcFrequencyMax() + : ReadAttribute("ac-frequency-max") { } - ~ReadElectricalMeasurementDcPower() {} + ~ReadElectricalMeasurementAcFrequencyMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000106) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000302) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); + [cluster readAttributeAcFrequencyMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcPower read Error", error); + LogNSError("ElectricalMeasurement AcFrequencyMax read Error", error); } SetCommandExitStatus(error); }]; @@ -77148,18 +85431,18 @@ class ReadElectricalMeasurementDcPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPower() - : SubscribeAttribute("dc-power") + SubscribeAttributeElectricalMeasurementAcFrequencyMax() + : SubscribeAttribute("ac-frequency-max") { } - ~SubscribeAttributeElectricalMeasurementDcPower() {} + ~SubscribeAttributeElectricalMeasurementAcFrequencyMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000106) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000302) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77174,12 +85457,12 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerWithParams:params + [cluster subscribeAttributeAcFrequencyMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPower response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77188,29 +85471,29 @@ class SubscribeAttributeElectricalMeasurementDcPower : public SubscribeAttribute }; /* - * Attribute DcPowerMin + * Attribute NeutralCurrent */ -class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { +class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { public: - ReadElectricalMeasurementDcPowerMin() - : ReadAttribute("dc-power-min") + ReadElectricalMeasurementNeutralCurrent() + : ReadAttribute("neutral-current") { } - ~ReadElectricalMeasurementDcPowerMin() {} + ~ReadElectricalMeasurementNeutralCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000107) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000303) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); + [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcPowerMin read Error", error); + LogNSError("ElectricalMeasurement NeutralCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -77218,18 +85501,18 @@ class ReadElectricalMeasurementDcPowerMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPowerMin() - : SubscribeAttribute("dc-power-min") + SubscribeAttributeElectricalMeasurementNeutralCurrent() + : SubscribeAttribute("neutral-current") { } - ~SubscribeAttributeElectricalMeasurementDcPowerMin() {} + ~SubscribeAttributeElectricalMeasurementNeutralCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000107) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000303) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77244,12 +85527,12 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerMinWithParams:params + [cluster subscribeAttributeNeutralCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMin response %@", [value description]); + NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77258,29 +85541,29 @@ class SubscribeAttributeElectricalMeasurementDcPowerMin : public SubscribeAttrib }; /* - * Attribute DcPowerMax + * Attribute TotalActivePower */ -class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { +class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { public: - ReadElectricalMeasurementDcPowerMax() - : ReadAttribute("dc-power-max") + ReadElectricalMeasurementTotalActivePower() + : ReadAttribute("total-active-power") { } - ~ReadElectricalMeasurementDcPowerMax() {} + ~ReadElectricalMeasurementTotalActivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000108) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000304) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); + [cluster readAttributeTotalActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcPowerMax read Error", error); + LogNSError("ElectricalMeasurement TotalActivePower read Error", error); } SetCommandExitStatus(error); }]; @@ -77288,18 +85571,18 @@ class ReadElectricalMeasurementDcPowerMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementTotalActivePower : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPowerMax() - : SubscribeAttribute("dc-power-max") + SubscribeAttributeElectricalMeasurementTotalActivePower() + : SubscribeAttribute("total-active-power") { } - ~SubscribeAttributeElectricalMeasurementDcPowerMax() {} + ~SubscribeAttributeElectricalMeasurementTotalActivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000108) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000304) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77314,12 +85597,12 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerMaxWithParams:params + [cluster subscribeAttributeTotalActivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMax response %@", [value description]); + NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77328,29 +85611,29 @@ class SubscribeAttributeElectricalMeasurementDcPowerMax : public SubscribeAttrib }; /* - * Attribute DcVoltageMultiplier + * Attribute TotalReactivePower */ -class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { +class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageMultiplier() - : ReadAttribute("dc-voltage-multiplier") + ReadElectricalMeasurementTotalReactivePower() + : ReadAttribute("total-reactive-power") { } - ~ReadElectricalMeasurementDcVoltageMultiplier() {} + ~ReadElectricalMeasurementTotalReactivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000200) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000305) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + [cluster readAttributeTotalReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcVoltageMultiplier read Error", error); + LogNSError("ElectricalMeasurement TotalReactivePower read Error", error); } SetCommandExitStatus(error); }]; @@ -77358,18 +85641,18 @@ class ReadElectricalMeasurementDcVoltageMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementTotalReactivePower : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageMultiplier() - : SubscribeAttribute("dc-voltage-multiplier") + SubscribeAttributeElectricalMeasurementTotalReactivePower() + : SubscribeAttribute("total-reactive-power") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageMultiplier() {} + ~SubscribeAttributeElectricalMeasurementTotalReactivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000200) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000305) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77384,12 +85667,12 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageMultiplierWithParams:params + [cluster subscribeAttributeTotalReactivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77398,29 +85681,29 @@ class SubscribeAttributeElectricalMeasurementDcVoltageMultiplier : public Subscr }; /* - * Attribute DcVoltageDivisor + * Attribute TotalApparentPower */ -class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { +class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { public: - ReadElectricalMeasurementDcVoltageDivisor() - : ReadAttribute("dc-voltage-divisor") + ReadElectricalMeasurementTotalApparentPower() + : ReadAttribute("total-apparent-power") { } - ~ReadElectricalMeasurementDcVoltageDivisor() {} + ~ReadElectricalMeasurementTotalApparentPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000201) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000306) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); + [cluster readAttributeTotalApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcVoltageDivisor read Error", error); + LogNSError("ElectricalMeasurement TotalApparentPower read Error", error); } SetCommandExitStatus(error); }]; @@ -77428,18 +85711,18 @@ class ReadElectricalMeasurementDcVoltageDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementTotalApparentPower : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcVoltageDivisor() - : SubscribeAttribute("dc-voltage-divisor") + SubscribeAttributeElectricalMeasurementTotalApparentPower() + : SubscribeAttribute("total-apparent-power") { } - ~SubscribeAttributeElectricalMeasurementDcVoltageDivisor() {} + ~SubscribeAttributeElectricalMeasurementTotalApparentPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000201) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000306) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77454,12 +85737,12 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcVoltageDivisorWithParams:params + [cluster subscribeAttributeTotalApparentPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcVoltageDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77468,29 +85751,29 @@ class SubscribeAttributeElectricalMeasurementDcVoltageDivisor : public Subscribe }; /* - * Attribute DcCurrentMultiplier + * Attribute Measured1stHarmonicCurrent */ -class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { +class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentMultiplier() - : ReadAttribute("dc-current-multiplier") + ReadElectricalMeasurementMeasured1stHarmonicCurrent() + : ReadAttribute("measured1st-harmonic-current") { } - ~ReadElectricalMeasurementDcCurrentMultiplier() {} + ~ReadElectricalMeasurementMeasured1stHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000202) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000307) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); + [cluster readAttributeMeasured1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcCurrentMultiplier read Error", error); + LogNSError("ElectricalMeasurement Measured1stHarmonicCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -77498,18 +85781,18 @@ class ReadElectricalMeasurementDcCurrentMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentMultiplier() - : SubscribeAttribute("dc-current-multiplier") + SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent() + : SubscribeAttribute("measured1st-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentMultiplier() {} + ~SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000202) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000307) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77524,12 +85807,12 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentMultiplierWithParams:params + [cluster subscribeAttributeMeasured1stHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77538,29 +85821,29 @@ class SubscribeAttributeElectricalMeasurementDcCurrentMultiplier : public Subscr }; /* - * Attribute DcCurrentDivisor + * Attribute Measured3rdHarmonicCurrent */ -class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { +class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementDcCurrentDivisor() - : ReadAttribute("dc-current-divisor") + ReadElectricalMeasurementMeasured3rdHarmonicCurrent() + : ReadAttribute("measured3rd-harmonic-current") { } - ~ReadElectricalMeasurementDcCurrentDivisor() {} + ~ReadElectricalMeasurementMeasured3rdHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000203) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000308) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); + [cluster readAttributeMeasured3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcCurrentDivisor read Error", error); + LogNSError("ElectricalMeasurement Measured3rdHarmonicCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -77568,18 +85851,18 @@ class ReadElectricalMeasurementDcCurrentDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcCurrentDivisor() - : SubscribeAttribute("dc-current-divisor") + SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent() + : SubscribeAttribute("measured3rd-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementDcCurrentDivisor() {} + ~SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000203) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000308) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77594,12 +85877,12 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcCurrentDivisorWithParams:params + [cluster subscribeAttributeMeasured3rdHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcCurrentDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77608,29 +85891,29 @@ class SubscribeAttributeElectricalMeasurementDcCurrentDivisor : public Subscribe }; /* - * Attribute DcPowerMultiplier + * Attribute Measured5thHarmonicCurrent */ -class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { +class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementDcPowerMultiplier() - : ReadAttribute("dc-power-multiplier") + ReadElectricalMeasurementMeasured5thHarmonicCurrent() + : ReadAttribute("measured5th-harmonic-current") { } - ~ReadElectricalMeasurementDcPowerMultiplier() {} + ~ReadElectricalMeasurementMeasured5thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000204) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000309) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); + [cluster readAttributeMeasured5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcPowerMultiplier read Error", error); + LogNSError("ElectricalMeasurement Measured5thHarmonicCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -77638,18 +85921,18 @@ class ReadElectricalMeasurementDcPowerMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPowerMultiplier() - : SubscribeAttribute("dc-power-multiplier") + SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent() + : SubscribeAttribute("measured5th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementDcPowerMultiplier() {} + ~SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000204) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000309) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77664,12 +85947,12 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerMultiplierWithParams:params + [cluster subscribeAttributeMeasured5thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77678,29 +85961,29 @@ class SubscribeAttributeElectricalMeasurementDcPowerMultiplier : public Subscrib }; /* - * Attribute DcPowerDivisor + * Attribute Measured7thHarmonicCurrent */ -class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { +class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementDcPowerDivisor() - : ReadAttribute("dc-power-divisor") + ReadElectricalMeasurementMeasured7thHarmonicCurrent() + : ReadAttribute("measured7th-harmonic-current") { } - ~ReadElectricalMeasurementDcPowerDivisor() {} + ~ReadElectricalMeasurementMeasured7thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000205) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); + [cluster readAttributeMeasured7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement DcPowerDivisor read Error", error); + LogNSError("ElectricalMeasurement Measured7thHarmonicCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -77708,18 +85991,18 @@ class ReadElectricalMeasurementDcPowerDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementDcPowerDivisor() - : SubscribeAttribute("dc-power-divisor") + SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent() + : SubscribeAttribute("measured7th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementDcPowerDivisor() {} + ~SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000205) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77734,12 +86017,12 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDcPowerDivisorWithParams:params + [cluster subscribeAttributeMeasured7thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.DcPowerDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77748,29 +86031,29 @@ class SubscribeAttributeElectricalMeasurementDcPowerDivisor : public SubscribeAt }; /* - * Attribute AcFrequency + * Attribute Measured9thHarmonicCurrent */ -class ReadElectricalMeasurementAcFrequency : public ReadAttribute { +class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequency() - : ReadAttribute("ac-frequency") + ReadElectricalMeasurementMeasured9thHarmonicCurrent() + : ReadAttribute("measured9th-harmonic-current") { } - ~ReadElectricalMeasurementAcFrequency() {} + ~ReadElectricalMeasurementMeasured9thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000300) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); + [cluster readAttributeMeasured9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcFrequency read Error", error); + LogNSError("ElectricalMeasurement Measured9thHarmonicCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -77778,18 +86061,18 @@ class ReadElectricalMeasurementAcFrequency : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequency() - : SubscribeAttribute("ac-frequency") + SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent() + : SubscribeAttribute("measured9th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementAcFrequency() {} + ~SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000300) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77804,12 +86087,12 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyWithParams:params + [cluster subscribeAttributeMeasured9thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequency response %@", [value description]); + NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77818,29 +86101,29 @@ class SubscribeAttributeElectricalMeasurementAcFrequency : public SubscribeAttri }; /* - * Attribute AcFrequencyMin + * Attribute Measured11thHarmonicCurrent */ -class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { +class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyMin() - : ReadAttribute("ac-frequency-min") + ReadElectricalMeasurementMeasured11thHarmonicCurrent() + : ReadAttribute("measured11th-harmonic-current") { } - ~ReadElectricalMeasurementAcFrequencyMin() {} + ~ReadElectricalMeasurementMeasured11thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000301) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); + [cluster readAttributeMeasured11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcFrequencyMin read Error", error); + LogNSError("ElectricalMeasurement Measured11thHarmonicCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -77848,18 +86131,18 @@ class ReadElectricalMeasurementAcFrequencyMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyMin() - : SubscribeAttribute("ac-frequency-min") + SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent() + : SubscribeAttribute("measured11th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyMin() {} + ~SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000301) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77874,12 +86157,12 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyMinWithParams:params + [cluster subscribeAttributeMeasured11thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMin response %@", [value description]); + NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77888,48 +86171,49 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMin : public SubscribeAt }; /* - * Attribute AcFrequencyMax + * Attribute MeasuredPhase1stHarmonicCurrent */ -class ReadElectricalMeasurementAcFrequencyMax : public ReadAttribute { +class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyMax() - : ReadAttribute("ac-frequency-max") + ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent() + : ReadAttribute("measured-phase1st-harmonic-current") { } - ~ReadElectricalMeasurementAcFrequencyMax() {} + ~ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000302) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AcFrequencyMax read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase1stHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyMax() - : SubscribeAttribute("ac-frequency-max") + SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent() + : SubscribeAttribute("measured-phase1st-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyMax() {} + ~SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000302) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -77944,12 +86228,12 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyMaxWithParams:params + [cluster subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMax response %@", [value description]); + NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -77958,48 +86242,49 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMax : public SubscribeAt }; /* - * Attribute NeutralCurrent + * Attribute MeasuredPhase3rdHarmonicCurrent */ -class ReadElectricalMeasurementNeutralCurrent : public ReadAttribute { +class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementNeutralCurrent() - : ReadAttribute("neutral-current") + ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() + : ReadAttribute("measured-phase3rd-harmonic-current") { } - ~ReadElectricalMeasurementNeutralCurrent() {} + ~ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000303) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNeutralCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement NeutralCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase3rdHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementNeutralCurrent() - : SubscribeAttribute("neutral-current") + SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() + : SubscribeAttribute("measured-phase3rd-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementNeutralCurrent() {} + ~SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000303) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78014,12 +86299,12 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNeutralCurrentWithParams:params + [cluster subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.NeutralCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78028,48 +86313,49 @@ class SubscribeAttributeElectricalMeasurementNeutralCurrent : public SubscribeAt }; /* - * Attribute TotalActivePower + * Attribute MeasuredPhase5thHarmonicCurrent */ -class ReadElectricalMeasurementTotalActivePower : public ReadAttribute { +class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementTotalActivePower() - : ReadAttribute("total-active-power") + ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent() + : ReadAttribute("measured-phase5th-harmonic-current") { } - ~ReadElectricalMeasurementTotalActivePower() {} + ~ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000304) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement TotalActivePower read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase5thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementTotalActivePower : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementTotalActivePower() - : SubscribeAttribute("total-active-power") + SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent() + : SubscribeAttribute("measured-phase5th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementTotalActivePower() {} + ~SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000304) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78084,12 +86370,12 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalActivePowerWithParams:params + [cluster subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalActivePower response %@", [value description]); + NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78098,48 +86384,49 @@ class SubscribeAttributeElectricalMeasurementTotalActivePower : public Subscribe }; /* - * Attribute TotalReactivePower + * Attribute MeasuredPhase7thHarmonicCurrent */ -class ReadElectricalMeasurementTotalReactivePower : public ReadAttribute { +class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementTotalReactivePower() - : ReadAttribute("total-reactive-power") + ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent() + : ReadAttribute("measured-phase7th-harmonic-current") { } - ~ReadElectricalMeasurementTotalReactivePower() {} + ~ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000305) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000310) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement TotalReactivePower read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase7thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementTotalReactivePower : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementTotalReactivePower() - : SubscribeAttribute("total-reactive-power") + SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent() + : SubscribeAttribute("measured-phase7th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementTotalReactivePower() {} + ~SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000305) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000310) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78154,12 +86441,12 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalReactivePowerWithParams:params + [cluster subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalReactivePower response %@", [value description]); + NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78168,48 +86455,49 @@ class SubscribeAttributeElectricalMeasurementTotalReactivePower : public Subscri }; /* - * Attribute TotalApparentPower + * Attribute MeasuredPhase9thHarmonicCurrent */ -class ReadElectricalMeasurementTotalApparentPower : public ReadAttribute { +class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementTotalApparentPower() - : ReadAttribute("total-apparent-power") + ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent() + : ReadAttribute("measured-phase9th-harmonic-current") { } - ~ReadElectricalMeasurementTotalApparentPower() {} + ~ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000306) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000311) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement TotalApparentPower read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase9thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementTotalApparentPower : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementTotalApparentPower() - : SubscribeAttribute("total-apparent-power") + SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent() + : SubscribeAttribute("measured-phase9th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementTotalApparentPower() {} + ~SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000306) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000311) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78224,12 +86512,12 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalApparentPowerWithParams:params + [cluster subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.TotalApparentPower response %@", [value description]); + NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78238,48 +86526,49 @@ class SubscribeAttributeElectricalMeasurementTotalApparentPower : public Subscri }; /* - * Attribute Measured1stHarmonicCurrent + * Attribute MeasuredPhase11thHarmonicCurrent */ -class ReadElectricalMeasurementMeasured1stHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAttribute { public: - ReadElectricalMeasurementMeasured1stHarmonicCurrent() - : ReadAttribute("measured1st-harmonic-current") + ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent() + : ReadAttribute("measured-phase11th-harmonic-current") { } - ~ReadElectricalMeasurementMeasured1stHarmonicCurrent() {} + ~ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000307) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000312) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement Measured1stHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement MeasuredPhase11thHarmonicCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent() - : SubscribeAttribute("measured1st-harmonic-current") + SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent() + : SubscribeAttribute("measured-phase11th-harmonic-current") { } - ~SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000307) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000312) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78294,12 +86583,12 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured1stHarmonicCurrentWithParams:params + [cluster subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured1stHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78308,29 +86597,29 @@ class SubscribeAttributeElectricalMeasurementMeasured1stHarmonicCurrent : public }; /* - * Attribute Measured3rdHarmonicCurrent + * Attribute AcFrequencyMultiplier */ -class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementMeasured3rdHarmonicCurrent() - : ReadAttribute("measured3rd-harmonic-current") + ReadElectricalMeasurementAcFrequencyMultiplier() + : ReadAttribute("ac-frequency-multiplier") { } - ~ReadElectricalMeasurementMeasured3rdHarmonicCurrent() {} + ~ReadElectricalMeasurementAcFrequencyMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000308) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000400) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); + [cluster readAttributeAcFrequencyMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement Measured3rdHarmonicCurrent read Error", error); + LogNSError("ElectricalMeasurement AcFrequencyMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -78338,18 +86627,18 @@ class ReadElectricalMeasurementMeasured3rdHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent() - : SubscribeAttribute("measured3rd-harmonic-current") + SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier() + : SubscribeAttribute("ac-frequency-multiplier") { } - ~SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000308) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000400) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78364,12 +86653,12 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured3rdHarmonicCurrentWithParams:params + [cluster subscribeAttributeAcFrequencyMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured3rdHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78378,29 +86667,29 @@ class SubscribeAttributeElectricalMeasurementMeasured3rdHarmonicCurrent : public }; /* - * Attribute Measured5thHarmonicCurrent + * Attribute AcFrequencyDivisor */ -class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { public: - ReadElectricalMeasurementMeasured5thHarmonicCurrent() - : ReadAttribute("measured5th-harmonic-current") + ReadElectricalMeasurementAcFrequencyDivisor() + : ReadAttribute("ac-frequency-divisor") { } - ~ReadElectricalMeasurementMeasured5thHarmonicCurrent() {} + ~ReadElectricalMeasurementAcFrequencyDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000309) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000401) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); + [cluster readAttributeAcFrequencyDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement Measured5thHarmonicCurrent read Error", error); + LogNSError("ElectricalMeasurement AcFrequencyDivisor read Error", error); } SetCommandExitStatus(error); }]; @@ -78408,18 +86697,18 @@ class ReadElectricalMeasurementMeasured5thHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent() - : SubscribeAttribute("measured5th-harmonic-current") + SubscribeAttributeElectricalMeasurementAcFrequencyDivisor() + : SubscribeAttribute("ac-frequency-divisor") { } - ~SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementAcFrequencyDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000309) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000401) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78434,12 +86723,12 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured5thHarmonicCurrentWithParams:params + [cluster subscribeAttributeAcFrequencyDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured5thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78448,29 +86737,29 @@ class SubscribeAttributeElectricalMeasurementMeasured5thHarmonicCurrent : public }; /* - * Attribute Measured7thHarmonicCurrent + * Attribute PowerMultiplier */ -class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementMeasured7thHarmonicCurrent() - : ReadAttribute("measured7th-harmonic-current") + ReadElectricalMeasurementPowerMultiplier() + : ReadAttribute("power-multiplier") { } - ~ReadElectricalMeasurementMeasured7thHarmonicCurrent() {} + ~ReadElectricalMeasurementPowerMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000402) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); + [cluster readAttributePowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement Measured7thHarmonicCurrent read Error", error); + LogNSError("ElectricalMeasurement PowerMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -78478,18 +86767,18 @@ class ReadElectricalMeasurementMeasured7thHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent() - : SubscribeAttribute("measured7th-harmonic-current") + SubscribeAttributeElectricalMeasurementPowerMultiplier() + : SubscribeAttribute("power-multiplier") { } - ~SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementPowerMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000402) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78504,12 +86793,12 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured7thHarmonicCurrentWithParams:params + [cluster subscribeAttributePowerMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured7thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78518,29 +86807,29 @@ class SubscribeAttributeElectricalMeasurementMeasured7thHarmonicCurrent : public }; /* - * Attribute Measured9thHarmonicCurrent + * Attribute PowerDivisor */ -class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { public: - ReadElectricalMeasurementMeasured9thHarmonicCurrent() - : ReadAttribute("measured9th-harmonic-current") + ReadElectricalMeasurementPowerDivisor() + : ReadAttribute("power-divisor") { } - ~ReadElectricalMeasurementMeasured9thHarmonicCurrent() {} + ~ReadElectricalMeasurementPowerDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000403) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); + [cluster readAttributePowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement Measured9thHarmonicCurrent read Error", error); + LogNSError("ElectricalMeasurement PowerDivisor read Error", error); } SetCommandExitStatus(error); }]; @@ -78548,18 +86837,18 @@ class ReadElectricalMeasurementMeasured9thHarmonicCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent() - : SubscribeAttribute("measured9th-harmonic-current") + SubscribeAttributeElectricalMeasurementPowerDivisor() + : SubscribeAttribute("power-divisor") { } - ~SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementPowerDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000403) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78574,12 +86863,12 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured9thHarmonicCurrentWithParams:params + [cluster subscribeAttributePowerDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured9thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78588,29 +86877,29 @@ class SubscribeAttributeElectricalMeasurementMeasured9thHarmonicCurrent : public }; /* - * Attribute Measured11thHarmonicCurrent + * Attribute HarmonicCurrentMultiplier */ -class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementMeasured11thHarmonicCurrent() - : ReadAttribute("measured11th-harmonic-current") + ReadElectricalMeasurementHarmonicCurrentMultiplier() + : ReadAttribute("harmonic-current-multiplier") { } - ~ReadElectricalMeasurementMeasured11thHarmonicCurrent() {} + ~ReadElectricalMeasurementHarmonicCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000404) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeasured11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); + [cluster readAttributeHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement Measured11thHarmonicCurrent read Error", error); + LogNSError("ElectricalMeasurement HarmonicCurrentMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -78618,18 +86907,18 @@ class ReadElectricalMeasurementMeasured11thHarmonicCurrent : public ReadAttribut } }; -class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent() - : SubscribeAttribute("measured11th-harmonic-current") + SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier() + : SubscribeAttribute("harmonic-current-multiplier") { } - ~SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000404) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78644,12 +86933,12 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasured11thHarmonicCurrentWithParams:params + [cluster subscribeAttributeHarmonicCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.Measured11thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78658,30 +86947,30 @@ class SubscribeAttributeElectricalMeasurementMeasured11thHarmonicCurrent : publi }; /* - * Attribute MeasuredPhase1stHarmonicCurrent + * Attribute PhaseHarmonicCurrentMultiplier */ -class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent() - : ReadAttribute("measured-phase1st-harmonic-current") + ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier() + : ReadAttribute("phase-harmonic-current-multiplier") { } - ~ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent() {} + ~ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000405) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster - readAttributeMeasuredPhase1stHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + readAttributePhaseHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase1stHarmonicCurrent read Error", error); + LogNSError("ElectricalMeasurement PhaseHarmonicCurrentMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -78689,18 +86978,18 @@ class ReadElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public ReadAttr } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent() - : SubscribeAttribute("measured-phase1st-harmonic-current") + SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier() + : SubscribeAttribute("phase-harmonic-current-multiplier") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000405) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78715,12 +87004,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase1stHarmonicCurrentWithParams:params + [cluster subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase1stHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78729,49 +87018,48 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase1stHarmonicCurrent : p }; /* - * Attribute MeasuredPhase3rdHarmonicCurrent + * Attribute InstantaneousVoltage */ -class ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() - : ReadAttribute("measured-phase3rd-harmonic-current") + ReadElectricalMeasurementInstantaneousVoltage() + : ReadAttribute("instantaneous-voltage") { } - ~ReadElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() {} + ~ReadElectricalMeasurementInstantaneousVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000500) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasuredPhase3rdHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase3rdHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstantaneousVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement InstantaneousVoltage read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() - : SubscribeAttribute("measured-phase3rd-harmonic-current") + SubscribeAttributeElectricalMeasurementInstantaneousVoltage() + : SubscribeAttribute("instantaneous-voltage") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementInstantaneousVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000500) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78786,12 +87074,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase3rdHarmonicCurrentWithParams:params + [cluster subscribeAttributeInstantaneousVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase3rdHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78800,49 +87088,48 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase3rdHarmonicCurrent : p }; /* - * Attribute MeasuredPhase5thHarmonicCurrent + * Attribute InstantaneousLineCurrent */ -class ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent() - : ReadAttribute("measured-phase5th-harmonic-current") + ReadElectricalMeasurementInstantaneousLineCurrent() + : ReadAttribute("instantaneous-line-current") { } - ~ReadElectricalMeasurementMeasuredPhase5thHarmonicCurrent() {} + ~ReadElectricalMeasurementInstantaneousLineCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000030F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000501) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasuredPhase5thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase5thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstantaneousLineCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement InstantaneousLineCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent() - : SubscribeAttribute("measured-phase5th-harmonic-current") + SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent() + : SubscribeAttribute("instantaneous-line-current") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000030F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000501) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78857,12 +87144,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase5thHarmonicCurrentWithParams:params + [cluster subscribeAttributeInstantaneousLineCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase5thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78871,49 +87158,48 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase5thHarmonicCurrent : p }; /* - * Attribute MeasuredPhase7thHarmonicCurrent + * Attribute InstantaneousActiveCurrent */ -class ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent() - : ReadAttribute("measured-phase7th-harmonic-current") + ReadElectricalMeasurementInstantaneousActiveCurrent() + : ReadAttribute("instantaneous-active-current") { } - ~ReadElectricalMeasurementMeasuredPhase7thHarmonicCurrent() {} + ~ReadElectricalMeasurementInstantaneousActiveCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000310) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000502) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasuredPhase7thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase7thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstantaneousActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement InstantaneousActiveCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent() - : SubscribeAttribute("measured-phase7th-harmonic-current") + SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent() + : SubscribeAttribute("instantaneous-active-current") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000310) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000502) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78928,12 +87214,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase7thHarmonicCurrentWithParams:params + [cluster subscribeAttributeInstantaneousActiveCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase7thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -78942,49 +87228,48 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase7thHarmonicCurrent : p }; /* - * Attribute MeasuredPhase9thHarmonicCurrent + * Attribute InstantaneousReactiveCurrent */ -class ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent() - : ReadAttribute("measured-phase9th-harmonic-current") + ReadElectricalMeasurementInstantaneousReactiveCurrent() + : ReadAttribute("instantaneous-reactive-current") { } - ~ReadElectricalMeasurementMeasuredPhase9thHarmonicCurrent() {} + ~ReadElectricalMeasurementInstantaneousReactiveCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000311) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000503) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasuredPhase9thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase9thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstantaneousReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement InstantaneousReactiveCurrent read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent() - : SubscribeAttribute("measured-phase9th-harmonic-current") + SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent() + : SubscribeAttribute("instantaneous-reactive-current") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000311) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000503) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -78999,12 +87284,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase9thHarmonicCurrentWithParams:params + [cluster subscribeAttributeInstantaneousReactiveCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase9thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79013,49 +87298,48 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase9thHarmonicCurrent : p }; /* - * Attribute MeasuredPhase11thHarmonicCurrent + * Attribute InstantaneousPower */ -class ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public ReadAttribute { +class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { public: - ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent() - : ReadAttribute("measured-phase11th-harmonic-current") + ReadElectricalMeasurementInstantaneousPower() + : ReadAttribute("instantaneous-power") { } - ~ReadElectricalMeasurementMeasuredPhase11thHarmonicCurrent() {} + ~ReadElectricalMeasurementInstantaneousPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000312) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000504) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeMeasuredPhase11thHarmonicCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement MeasuredPhase11thHarmonicCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeInstantaneousPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement InstantaneousPower read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementInstantaneousPower : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent() - : SubscribeAttribute("measured-phase11th-harmonic-current") + SubscribeAttributeElectricalMeasurementInstantaneousPower() + : SubscribeAttribute("instantaneous-power") { } - ~SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent() {} + ~SubscribeAttributeElectricalMeasurementInstantaneousPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000312) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000504) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79070,12 +87354,12 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeasuredPhase11thHarmonicCurrentWithParams:params + [cluster subscribeAttributeInstantaneousPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.MeasuredPhase11thHarmonicCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79084,29 +87368,29 @@ class SubscribeAttributeElectricalMeasurementMeasuredPhase11thHarmonicCurrent : }; /* - * Attribute AcFrequencyMultiplier + * Attribute RmsVoltage */ -class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyMultiplier() - : ReadAttribute("ac-frequency-multiplier") + ReadElectricalMeasurementRmsVoltage() + : ReadAttribute("rms-voltage") { } - ~ReadElectricalMeasurementAcFrequencyMultiplier() {} + ~ReadElectricalMeasurementRmsVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000400) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000505) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); + [cluster readAttributeRmsVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcFrequencyMultiplier read Error", error); + LogNSError("ElectricalMeasurement RmsVoltage read Error", error); } SetCommandExitStatus(error); }]; @@ -79114,18 +87398,18 @@ class ReadElectricalMeasurementAcFrequencyMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier() - : SubscribeAttribute("ac-frequency-multiplier") + SubscribeAttributeElectricalMeasurementRmsVoltage() + : SubscribeAttribute("rms-voltage") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000400) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000505) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79140,12 +87424,12 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyMultiplierWithParams:params + [cluster subscribeAttributeRmsVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79154,29 +87438,29 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyMultiplier : public Subs }; /* - * Attribute AcFrequencyDivisor + * Attribute RmsVoltageMin */ -class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { public: - ReadElectricalMeasurementAcFrequencyDivisor() - : ReadAttribute("ac-frequency-divisor") + ReadElectricalMeasurementRmsVoltageMin() + : ReadAttribute("rms-voltage-min") { } - ~ReadElectricalMeasurementAcFrequencyDivisor() {} + ~ReadElectricalMeasurementRmsVoltageMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000401) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000506) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcFrequencyDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); + [cluster readAttributeRmsVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcFrequencyDivisor read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageMin read Error", error); } SetCommandExitStatus(error); }]; @@ -79184,18 +87468,18 @@ class ReadElectricalMeasurementAcFrequencyDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcFrequencyDivisor() - : SubscribeAttribute("ac-frequency-divisor") + SubscribeAttributeElectricalMeasurementRmsVoltageMin() + : SubscribeAttribute("rms-voltage-min") { } - ~SubscribeAttributeElectricalMeasurementAcFrequencyDivisor() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000401) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000506) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79210,12 +87494,12 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcFrequencyDivisorWithParams:params + [cluster subscribeAttributeRmsVoltageMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcFrequencyDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79224,29 +87508,29 @@ class SubscribeAttributeElectricalMeasurementAcFrequencyDivisor : public Subscri }; /* - * Attribute PowerMultiplier + * Attribute RmsVoltageMax */ -class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { public: - ReadElectricalMeasurementPowerMultiplier() - : ReadAttribute("power-multiplier") + ReadElectricalMeasurementRmsVoltageMax() + : ReadAttribute("rms-voltage-max") { } - ~ReadElectricalMeasurementPowerMultiplier() {} + ~ReadElectricalMeasurementRmsVoltageMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000402) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000507) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); + [cluster readAttributeRmsVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement PowerMultiplier read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageMax read Error", error); } SetCommandExitStatus(error); }]; @@ -79254,18 +87538,18 @@ class ReadElectricalMeasurementPowerMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerMultiplier() - : SubscribeAttribute("power-multiplier") + SubscribeAttributeElectricalMeasurementRmsVoltageMax() + : SubscribeAttribute("rms-voltage-max") { } - ~SubscribeAttributeElectricalMeasurementPowerMultiplier() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000402) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000507) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79280,12 +87564,12 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerMultiplierWithParams:params + [cluster subscribeAttributeRmsVoltageMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79294,29 +87578,29 @@ class SubscribeAttributeElectricalMeasurementPowerMultiplier : public SubscribeA }; /* - * Attribute PowerDivisor + * Attribute RmsCurrent */ -class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { public: - ReadElectricalMeasurementPowerDivisor() - : ReadAttribute("power-divisor") + ReadElectricalMeasurementRmsCurrent() + : ReadAttribute("rms-current") { } - ~ReadElectricalMeasurementPowerDivisor() {} + ~ReadElectricalMeasurementRmsCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000403) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000508) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); + [cluster readAttributeRmsCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement PowerDivisor read Error", error); + LogNSError("ElectricalMeasurement RmsCurrent read Error", error); } SetCommandExitStatus(error); }]; @@ -79324,18 +87608,18 @@ class ReadElectricalMeasurementPowerDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerDivisor() - : SubscribeAttribute("power-divisor") + SubscribeAttributeElectricalMeasurementRmsCurrent() + : SubscribeAttribute("rms-current") { } - ~SubscribeAttributeElectricalMeasurementPowerDivisor() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrent() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000403) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000508) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79350,12 +87634,12 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerDivisorWithParams:params + [cluster subscribeAttributeRmsCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79364,29 +87648,29 @@ class SubscribeAttributeElectricalMeasurementPowerDivisor : public SubscribeAttr }; /* - * Attribute HarmonicCurrentMultiplier + * Attribute RmsCurrentMin */ -class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { public: - ReadElectricalMeasurementHarmonicCurrentMultiplier() - : ReadAttribute("harmonic-current-multiplier") + ReadElectricalMeasurementRmsCurrentMin() + : ReadAttribute("rms-current-min") { } - ~ReadElectricalMeasurementHarmonicCurrentMultiplier() {} + ~ReadElectricalMeasurementRmsCurrentMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000404) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000509) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); + [cluster readAttributeRmsCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement HarmonicCurrentMultiplier read Error", error); + LogNSError("ElectricalMeasurement RmsCurrentMin read Error", error); } SetCommandExitStatus(error); }]; @@ -79394,18 +87678,18 @@ class ReadElectricalMeasurementHarmonicCurrentMultiplier : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier() - : SubscribeAttribute("harmonic-current-multiplier") + SubscribeAttributeElectricalMeasurementRmsCurrentMin() + : SubscribeAttribute("rms-current-min") { } - ~SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000404) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000509) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79420,12 +87704,12 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHarmonicCurrentMultiplierWithParams:params + [cluster subscribeAttributeRmsCurrentMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.HarmonicCurrentMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79434,49 +87718,48 @@ class SubscribeAttributeElectricalMeasurementHarmonicCurrentMultiplier : public }; /* - * Attribute PhaseHarmonicCurrentMultiplier + * Attribute RmsCurrentMax */ -class ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { public: - ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier() - : ReadAttribute("phase-harmonic-current-multiplier") + ReadElectricalMeasurementRmsCurrentMax() + : ReadAttribute("rms-current-max") { } - ~ReadElectricalMeasurementPhaseHarmonicCurrentMultiplier() {} + ~ReadElectricalMeasurementRmsCurrentMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000405) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributePhaseHarmonicCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement PhaseHarmonicCurrentMultiplier read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsCurrentMax read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier() - : SubscribeAttribute("phase-harmonic-current-multiplier") + SubscribeAttributeElectricalMeasurementRmsCurrentMax() + : SubscribeAttribute("rms-current-max") { } - ~SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000405) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79491,12 +87774,12 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseHarmonicCurrentMultiplierWithParams:params + [cluster subscribeAttributeRmsCurrentMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PhaseHarmonicCurrentMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79505,29 +87788,29 @@ class SubscribeAttributeElectricalMeasurementPhaseHarmonicCurrentMultiplier : pu }; /* - * Attribute InstantaneousVoltage + * Attribute ActivePower */ -class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { +class ReadElectricalMeasurementActivePower : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousVoltage() - : ReadAttribute("instantaneous-voltage") + ReadElectricalMeasurementActivePower() + : ReadAttribute("active-power") { } - ~ReadElectricalMeasurementInstantaneousVoltage() {} + ~ReadElectricalMeasurementActivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000500) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); + [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement InstantaneousVoltage read Error", error); + LogNSError("ElectricalMeasurement ActivePower read Error", error); } SetCommandExitStatus(error); }]; @@ -79535,18 +87818,18 @@ class ReadElectricalMeasurementInstantaneousVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousVoltage() - : SubscribeAttribute("instantaneous-voltage") + SubscribeAttributeElectricalMeasurementActivePower() + : SubscribeAttribute("active-power") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousVoltage() {} + ~SubscribeAttributeElectricalMeasurementActivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000500) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79561,12 +87844,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousVoltageWithParams:params + [cluster subscribeAttributeActivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousVoltage response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79575,29 +87858,29 @@ class SubscribeAttributeElectricalMeasurementInstantaneousVoltage : public Subsc }; /* - * Attribute InstantaneousLineCurrent + * Attribute ActivePowerMin */ -class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { +class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousLineCurrent() - : ReadAttribute("instantaneous-line-current") + ReadElectricalMeasurementActivePowerMin() + : ReadAttribute("active-power-min") { } - ~ReadElectricalMeasurementInstantaneousLineCurrent() {} + ~ReadElectricalMeasurementActivePowerMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000501) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousLineCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + [cluster readAttributeActivePowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement InstantaneousLineCurrent read Error", error); + LogNSError("ElectricalMeasurement ActivePowerMin read Error", error); } SetCommandExitStatus(error); }]; @@ -79605,18 +87888,18 @@ class ReadElectricalMeasurementInstantaneousLineCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent() - : SubscribeAttribute("instantaneous-line-current") + SubscribeAttributeElectricalMeasurementActivePowerMin() + : SubscribeAttribute("active-power-min") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent() {} + ~SubscribeAttributeElectricalMeasurementActivePowerMin() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000501) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79631,12 +87914,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousLineCurrentWithParams:params + [cluster subscribeAttributeActivePowerMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousLineCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79645,29 +87928,29 @@ class SubscribeAttributeElectricalMeasurementInstantaneousLineCurrent : public S }; /* - * Attribute InstantaneousActiveCurrent + * Attribute ActivePowerMax */ -class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute { +class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousActiveCurrent() - : ReadAttribute("instantaneous-active-current") + ReadElectricalMeasurementActivePowerMax() + : ReadAttribute("active-power-max") { } - ~ReadElectricalMeasurementInstantaneousActiveCurrent() {} + ~ReadElectricalMeasurementActivePowerMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000502) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousActiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + [cluster readAttributeActivePowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement InstantaneousActiveCurrent read Error", error); + LogNSError("ElectricalMeasurement ActivePowerMax read Error", error); } SetCommandExitStatus(error); }]; @@ -79675,18 +87958,18 @@ class ReadElectricalMeasurementInstantaneousActiveCurrent : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent() - : SubscribeAttribute("instantaneous-active-current") + SubscribeAttributeElectricalMeasurementActivePowerMax() + : SubscribeAttribute("active-power-max") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent() {} + ~SubscribeAttributeElectricalMeasurementActivePowerMax() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000502) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79701,12 +87984,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousActiveCurrentWithParams:params + [cluster subscribeAttributeActivePowerMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousActiveCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79715,29 +87998,29 @@ class SubscribeAttributeElectricalMeasurementInstantaneousActiveCurrent : public }; /* - * Attribute InstantaneousReactiveCurrent + * Attribute ReactivePower */ -class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribute { +class ReadElectricalMeasurementReactivePower : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousReactiveCurrent() - : ReadAttribute("instantaneous-reactive-current") + ReadElectricalMeasurementReactivePower() + : ReadAttribute("reactive-power") { } - ~ReadElectricalMeasurementInstantaneousReactiveCurrent() {} + ~ReadElectricalMeasurementReactivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000503) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousReactiveCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); + [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement InstantaneousReactiveCurrent read Error", error); + LogNSError("ElectricalMeasurement ReactivePower read Error", error); } SetCommandExitStatus(error); }]; @@ -79745,18 +88028,18 @@ class ReadElectricalMeasurementInstantaneousReactiveCurrent : public ReadAttribu } }; -class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent() - : SubscribeAttribute("instantaneous-reactive-current") + SubscribeAttributeElectricalMeasurementReactivePower() + : SubscribeAttribute("reactive-power") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent() {} + ~SubscribeAttributeElectricalMeasurementReactivePower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000503) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79771,12 +88054,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousReactiveCurrentWithParams:params + [cluster subscribeAttributeReactivePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousReactiveCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79785,29 +88068,29 @@ class SubscribeAttributeElectricalMeasurementInstantaneousReactiveCurrent : publ }; /* - * Attribute InstantaneousPower + * Attribute ApparentPower */ -class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { +class ReadElectricalMeasurementApparentPower : public ReadAttribute { public: - ReadElectricalMeasurementInstantaneousPower() - : ReadAttribute("instantaneous-power") + ReadElectricalMeasurementApparentPower() + : ReadAttribute("apparent-power") { } - ~ReadElectricalMeasurementInstantaneousPower() {} + ~ReadElectricalMeasurementApparentPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000504) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInstantaneousPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); + [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement InstantaneousPower read Error", error); + LogNSError("ElectricalMeasurement ApparentPower read Error", error); } SetCommandExitStatus(error); }]; @@ -79815,18 +88098,18 @@ class ReadElectricalMeasurementInstantaneousPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementInstantaneousPower : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementInstantaneousPower() - : SubscribeAttribute("instantaneous-power") + SubscribeAttributeElectricalMeasurementApparentPower() + : SubscribeAttribute("apparent-power") { } - ~SubscribeAttributeElectricalMeasurementInstantaneousPower() {} + ~SubscribeAttributeElectricalMeasurementApparentPower() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000504) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79841,12 +88124,12 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInstantaneousPowerWithParams:params + [cluster subscribeAttributeApparentPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.InstantaneousPower response %@", [value description]); + NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79855,29 +88138,29 @@ class SubscribeAttributeElectricalMeasurementInstantaneousPower : public Subscri }; /* - * Attribute RmsVoltage + * Attribute PowerFactor */ -class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { +class ReadElectricalMeasurementPowerFactor : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltage() - : ReadAttribute("rms-voltage") + ReadElectricalMeasurementPowerFactor() + : ReadAttribute("power-factor") { } - ~ReadElectricalMeasurementRmsVoltage() {} + ~ReadElectricalMeasurementPowerFactor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000505) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000510) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); + [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltage read Error", error); + LogNSError("ElectricalMeasurement PowerFactor read Error", error); } SetCommandExitStatus(error); }]; @@ -79885,18 +88168,18 @@ class ReadElectricalMeasurementRmsVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltage() - : SubscribeAttribute("rms-voltage") + SubscribeAttributeElectricalMeasurementPowerFactor() + : SubscribeAttribute("power-factor") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltage() {} + ~SubscribeAttributeElectricalMeasurementPowerFactor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000505) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000510) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79911,62 +88194,105 @@ class SubscribeAttributeElectricalMeasurementRmsVoltage : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageWithParams:params + [cluster subscribeAttributePowerFactorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltage response %@", [value description]); + NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AverageRmsVoltageMeasurementPeriod + */ +class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadAttribute { +public: + ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod() + : ReadAttribute("average-rms-voltage-measurement-period") + { + } + + ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000511) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster + readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod read Error", error); + } SetCommandExitStatus(error); }]; - return CHIP_NO_ERROR; } }; -/* - * Attribute RmsVoltageMin - */ -class ReadElectricalMeasurementRmsVoltageMin : public ReadAttribute { +class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public WriteAttribute { public: - ReadElectricalMeasurementRmsVoltageMin() - : ReadAttribute("rms-voltage-min") + WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod() + : WriteAttribute("average-rms-voltage-measurement-period") { + AddArgument("attr-name", "average-rms-voltage-measurement-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadElectricalMeasurementRmsVoltageMin() {} + ~WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000506) on endpoint %u", endpointId); - + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000511) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageMin read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement " + "AverageRmsVoltageMeasurementPeriod write Error", + error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } + +private: + uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMin() - : SubscribeAttribute("rms-voltage-min") + SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod() + : SubscribeAttribute("average-rms-voltage-measurement-period") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMin() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000506) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000511) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -79981,12 +88307,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMinWithParams:params + [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMin response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -79995,29 +88321,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMin : public SubscribeAtt }; /* - * Attribute RmsVoltageMax + * Attribute AverageRmsUnderVoltageCounter */ -class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMax() - : ReadAttribute("rms-voltage-max") + ReadElectricalMeasurementAverageRmsUnderVoltageCounter() + : ReadAttribute("average-rms-under-voltage-counter") { } - ~ReadElectricalMeasurementRmsVoltageMax() {} + ~ReadElectricalMeasurementAverageRmsUnderVoltageCounter() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000507) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000513) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); + [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageMax read Error", error); + LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter read Error", error); } SetCommandExitStatus(error); }]; @@ -80025,18 +88351,61 @@ class ReadElectricalMeasurementRmsVoltageMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAttribute { +class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMax() - : SubscribeAttribute("rms-voltage-max") + WriteElectricalMeasurementAverageRmsUnderVoltageCounter() + : WriteAttribute("average-rms-under-voltage-counter") { + AddArgument("attr-name", "average-rms-under-voltage-counter"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMax() {} + ~WriteElectricalMeasurementAverageRmsUnderVoltageCounter() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000507) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000513) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeAverageRmsUnderVoltageCounterWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : public SubscribeAttribute { +public: + SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter() + : SubscribeAttribute("average-rms-under-voltage-counter") + { + } + + ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000513) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80051,12 +88420,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMaxWithParams:params + [cluster subscribeAttributeAverageRmsUnderVoltageCounterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMax response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80065,29 +88434,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMax : public SubscribeAtt }; /* - * Attribute RmsCurrent + * Attribute RmsExtremeOverVoltagePeriod */ -class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrent() - : ReadAttribute("rms-current") + ReadElectricalMeasurementRmsExtremeOverVoltagePeriod() + : ReadAttribute("rms-extreme-over-voltage-period") { } - ~ReadElectricalMeasurementRmsCurrent() {} + ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000508) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000514) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); + [cluster readAttributeRmsExtremeOverVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrent read Error", error); + LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -80095,18 +88464,61 @@ class ReadElectricalMeasurementRmsCurrent : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttribute { +class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrent() - : SubscribeAttribute("rms-current") + WriteElectricalMeasurementRmsExtremeOverVoltagePeriod() + : WriteAttribute("rms-extreme-over-voltage-period") { + AddArgument("attr-name", "rms-extreme-over-voltage-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeElectricalMeasurementRmsCurrent() {} + ~WriteElectricalMeasurementRmsExtremeOverVoltagePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000508) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000514) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeRmsExtremeOverVoltagePeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : public SubscribeAttribute { +public: + SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod() + : SubscribeAttribute("rms-extreme-over-voltage-period") + { + } + + ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000514) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80121,12 +88533,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentWithParams:params + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrent response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80135,29 +88547,29 @@ class SubscribeAttributeElectricalMeasurementRmsCurrent : public SubscribeAttrib }; /* - * Attribute RmsCurrentMin + * Attribute RmsExtremeUnderVoltagePeriod */ -class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMin() - : ReadAttribute("rms-current-min") + ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod() + : ReadAttribute("rms-extreme-under-voltage-period") { } - ~ReadElectricalMeasurementRmsCurrentMin() {} + ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000509) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000515) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); + [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentMin read Error", error); + LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -80165,18 +88577,61 @@ class ReadElectricalMeasurementRmsCurrentMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAttribute { +class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMin() - : SubscribeAttribute("rms-current-min") + WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod() + : WriteAttribute("rms-extreme-under-voltage-period") { + AddArgument("attr-name", "rms-extreme-under-voltage-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMin() {} + ~WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000509) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000515) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError( + "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", + error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : public SubscribeAttribute { +public: + SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod() + : SubscribeAttribute("rms-extreme-under-voltage-period") + { + } + + ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000515) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80191,12 +88646,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMinWithParams:params + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMin response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80205,29 +88660,29 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMin : public SubscribeAtt }; /* - * Attribute RmsCurrentMax + * Attribute RmsVoltageSagPeriod */ -class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMax() - : ReadAttribute("rms-current-max") + ReadElectricalMeasurementRmsVoltageSagPeriod() + : ReadAttribute("rms-voltage-sag-period") { } - ~ReadElectricalMeasurementRmsCurrentMax() {} + ~ReadElectricalMeasurementRmsVoltageSagPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000516) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); + [cluster readAttributeRmsVoltageSagPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentMax read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSagPeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -80235,18 +88690,58 @@ class ReadElectricalMeasurementRmsCurrentMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAttribute { +class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMax() - : SubscribeAttribute("rms-current-max") + WriteElectricalMeasurementRmsVoltageSagPeriod() + : WriteAttribute("rms-voltage-sag-period") + { + AddArgument("attr-name", "rms-voltage-sag-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteElectricalMeasurementRmsVoltageSagPeriod() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000516) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster writeAttributeRmsVoltageSagPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMax() {} +private: + uint16_t mValue; +}; + +class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public SubscribeAttribute { +public: + SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod() + : SubscribeAttribute("rms-voltage-sag-period") + { + } + + ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000516) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80261,12 +88756,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMaxWithParams:params + [cluster subscribeAttributeRmsVoltageSagPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMax response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80275,29 +88770,29 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMax : public SubscribeAtt }; /* - * Attribute ActivePower + * Attribute RmsVoltageSwellPeriod */ -class ReadElectricalMeasurementActivePower : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { public: - ReadElectricalMeasurementActivePower() - : ReadAttribute("active-power") + ReadElectricalMeasurementRmsVoltageSwellPeriod() + : ReadAttribute("rms-voltage-swell-period") { } - ~ReadElectricalMeasurementActivePower() {} + ~ReadElectricalMeasurementRmsVoltageSwellPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000517) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); + [cluster readAttributeRmsVoltageSwellPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePower read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod read Error", error); } SetCommandExitStatus(error); }]; @@ -80305,18 +88800,59 @@ class ReadElectricalMeasurementActivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttribute { +class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { public: - SubscribeAttributeElectricalMeasurementActivePower() - : SubscribeAttribute("active-power") + WriteElectricalMeasurementRmsVoltageSwellPeriod() + : WriteAttribute("rms-voltage-swell-period") { + AddArgument("attr-name", "rms-voltage-swell-period"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeElectricalMeasurementActivePower() {} + ~WriteElectricalMeasurementRmsVoltageSwellPeriod() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000517) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + + [cluster + writeAttributeRmsVoltageSwellPeriodWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint16_t mValue; +}; + +class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public SubscribeAttribute { +public: + SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod() + : SubscribeAttribute("rms-voltage-swell-period") + { + } + + ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000517) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80331,12 +88867,12 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerWithParams:params + [cluster subscribeAttributeRmsVoltageSwellPeriodWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePower response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80345,29 +88881,29 @@ class SubscribeAttributeElectricalMeasurementActivePower : public SubscribeAttri }; /* - * Attribute ActivePowerMin + * Attribute AcVoltageMultiplier */ -class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { +class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMin() - : ReadAttribute("active-power-min") + ReadElectricalMeasurementAcVoltageMultiplier() + : ReadAttribute("ac-voltage-multiplier") { } - ~ReadElectricalMeasurementActivePowerMin() {} + ~ReadElectricalMeasurementAcVoltageMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000600) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); + [cluster readAttributeAcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerMin read Error", error); + LogNSError("ElectricalMeasurement AcVoltageMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -80375,18 +88911,18 @@ class ReadElectricalMeasurementActivePowerMin : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMin() - : SubscribeAttribute("active-power-min") + SubscribeAttributeElectricalMeasurementAcVoltageMultiplier() + : SubscribeAttribute("ac-voltage-multiplier") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMin() {} + ~SubscribeAttributeElectricalMeasurementAcVoltageMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000600) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80401,12 +88937,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMinWithParams:params + [cluster subscribeAttributeAcVoltageMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMin response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80415,29 +88951,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerMin : public SubscribeAt }; /* - * Attribute ActivePowerMax + * Attribute AcVoltageDivisor */ -class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { +class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMax() - : ReadAttribute("active-power-max") + ReadElectricalMeasurementAcVoltageDivisor() + : ReadAttribute("ac-voltage-divisor") { } - ~ReadElectricalMeasurementActivePowerMax() {} + ~ReadElectricalMeasurementAcVoltageDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000601) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); + [cluster readAttributeAcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerMax read Error", error); + LogNSError("ElectricalMeasurement AcVoltageDivisor read Error", error); } SetCommandExitStatus(error); }]; @@ -80445,18 +88981,18 @@ class ReadElectricalMeasurementActivePowerMax : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMax() - : SubscribeAttribute("active-power-max") + SubscribeAttributeElectricalMeasurementAcVoltageDivisor() + : SubscribeAttribute("ac-voltage-divisor") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMax() {} + ~SubscribeAttributeElectricalMeasurementAcVoltageDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000601) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80471,12 +89007,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMaxWithParams:params + [cluster subscribeAttributeAcVoltageDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMax response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80485,29 +89021,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerMax : public SubscribeAt }; /* - * Attribute ReactivePower + * Attribute AcCurrentMultiplier */ -class ReadElectricalMeasurementReactivePower : public ReadAttribute { +class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementReactivePower() - : ReadAttribute("reactive-power") + ReadElectricalMeasurementAcCurrentMultiplier() + : ReadAttribute("ac-current-multiplier") { } - ~ReadElectricalMeasurementReactivePower() {} + ~ReadElectricalMeasurementAcCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000602) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); + [cluster readAttributeAcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ReactivePower read Error", error); + LogNSError("ElectricalMeasurement AcCurrentMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -80515,18 +89051,18 @@ class ReadElectricalMeasurementReactivePower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactivePower() - : SubscribeAttribute("reactive-power") + SubscribeAttributeElectricalMeasurementAcCurrentMultiplier() + : SubscribeAttribute("ac-current-multiplier") { } - ~SubscribeAttributeElectricalMeasurementReactivePower() {} + ~SubscribeAttributeElectricalMeasurementAcCurrentMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000602) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80541,12 +89077,12 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactivePowerWithParams:params + [cluster subscribeAttributeAcCurrentMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePower response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80555,29 +89091,29 @@ class SubscribeAttributeElectricalMeasurementReactivePower : public SubscribeAtt }; /* - * Attribute ApparentPower + * Attribute AcCurrentDivisor */ -class ReadElectricalMeasurementApparentPower : public ReadAttribute { +class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { public: - ReadElectricalMeasurementApparentPower() - : ReadAttribute("apparent-power") + ReadElectricalMeasurementAcCurrentDivisor() + : ReadAttribute("ac-current-divisor") { } - ~ReadElectricalMeasurementApparentPower() {} + ~ReadElectricalMeasurementAcCurrentDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000050F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000603) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); + [cluster readAttributeAcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ApparentPower read Error", error); + LogNSError("ElectricalMeasurement AcCurrentDivisor read Error", error); } SetCommandExitStatus(error); }]; @@ -80585,18 +89121,18 @@ class ReadElectricalMeasurementApparentPower : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementApparentPower() - : SubscribeAttribute("apparent-power") + SubscribeAttributeElectricalMeasurementAcCurrentDivisor() + : SubscribeAttribute("ac-current-divisor") { } - ~SubscribeAttributeElectricalMeasurementApparentPower() {} + ~SubscribeAttributeElectricalMeasurementAcCurrentDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000050F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000603) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80611,12 +89147,12 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApparentPowerWithParams:params + [cluster subscribeAttributeAcCurrentDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPower response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80625,29 +89161,29 @@ class SubscribeAttributeElectricalMeasurementApparentPower : public SubscribeAtt }; /* - * Attribute PowerFactor + * Attribute AcPowerMultiplier */ -class ReadElectricalMeasurementPowerFactor : public ReadAttribute { +class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { public: - ReadElectricalMeasurementPowerFactor() - : ReadAttribute("power-factor") + ReadElectricalMeasurementAcPowerMultiplier() + : ReadAttribute("ac-power-multiplier") { } - ~ReadElectricalMeasurementPowerFactor() {} + ~ReadElectricalMeasurementAcPowerMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000510) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000604) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); + [cluster readAttributeAcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement PowerFactor read Error", error); + LogNSError("ElectricalMeasurement AcPowerMultiplier read Error", error); } SetCommandExitStatus(error); }]; @@ -80655,18 +89191,18 @@ class ReadElectricalMeasurementPowerFactor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerFactor() - : SubscribeAttribute("power-factor") + SubscribeAttributeElectricalMeasurementAcPowerMultiplier() + : SubscribeAttribute("ac-power-multiplier") { } - ~SubscribeAttributeElectricalMeasurementPowerFactor() {} + ~SubscribeAttributeElectricalMeasurementAcPowerMultiplier() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000510) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000604) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80681,12 +89217,12 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerFactorWithParams:params + [cluster subscribeAttributeAcPowerMultiplierWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactor response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80695,91 +89231,48 @@ class SubscribeAttributeElectricalMeasurementPowerFactor : public SubscribeAttri }; /* - * Attribute AverageRmsVoltageMeasurementPeriod + * Attribute AcPowerDivisor */ -class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public ReadAttribute { +class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod() - : ReadAttribute("average-rms-voltage-measurement-period") + ReadElectricalMeasurementAcPowerDivisor() + : ReadAttribute("ac-power-divisor") { } - ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriod() {} + ~ReadElectricalMeasurementAcPowerDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000511) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeAverageRmsVoltageMeasurementPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriod read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public WriteAttribute { -public: - WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod() - : WriteAttribute("average-rms-voltage-measurement-period") - { - AddArgument("attr-name", "average-rms-voltage-measurement-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementAverageRmsVoltageMeasurementPeriod() {} + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000605) on endpoint %u", endpointId); - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000511) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster writeAttributeAverageRmsVoltageMeasurementPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement " - "AverageRmsVoltageMeasurementPeriod write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeAcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AcPowerDivisor read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod() - : SubscribeAttribute("average-rms-voltage-measurement-period") + SubscribeAttributeElectricalMeasurementAcPowerDivisor() + : SubscribeAttribute("ac-power-divisor") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod() {} + ~SubscribeAttributeElectricalMeasurementAcPowerDivisor() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000511) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000605) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80794,12 +89287,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodWithParams:params + [cluster subscribeAttributeAcPowerDivisorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriod response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80808,29 +89301,29 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriod }; /* - * Attribute AverageRmsUnderVoltageCounter + * Attribute OverloadAlarmsMask */ -class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttribute { +class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsUnderVoltageCounter() - : ReadAttribute("average-rms-under-voltage-counter") + ReadElectricalMeasurementOverloadAlarmsMask() + : ReadAttribute("overload-alarms-mask") { } - ~ReadElectricalMeasurementAverageRmsUnderVoltageCounter() {} + ~ReadElectricalMeasurementOverloadAlarmsMask() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000513) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000700) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); + [cluster readAttributeOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounter read Error", error); + LogNSError("ElectricalMeasurement OverloadAlarmsMask read Error", error); } SetCommandExitStatus(error); }]; @@ -80838,21 +89331,21 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounter : public ReadAttrib } }; -class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttribute { +class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { public: - WriteElectricalMeasurementAverageRmsUnderVoltageCounter() - : WriteAttribute("average-rms-under-voltage-counter") + WriteElectricalMeasurementOverloadAlarmsMask() + : WriteAttribute("overload-alarms-mask") { - AddArgument("attr-name", "average-rms-under-voltage-counter"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); + AddArgument("attr-name", "overload-alarms-mask"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteElectricalMeasurementAverageRmsUnderVoltageCounter() {} + ~WriteElectricalMeasurementOverloadAlarmsMask() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000513) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000700) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80861,38 +89354,35 @@ class WriteElectricalMeasurementAverageRmsUnderVoltageCounter : public WriteAttr params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster - writeAttributeAverageRmsUnderVoltageCounterWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement AverageRmsUnderVoltageCounter write Error", - error); - } - SetCommandExitStatus(error); - }]; + [cluster writeAttributeOverloadAlarmsMaskWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - uint16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter() - : SubscribeAttribute("average-rms-under-voltage-counter") + SubscribeAttributeElectricalMeasurementOverloadAlarmsMask() + : SubscribeAttribute("overload-alarms-mask") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter() {} + ~SubscribeAttributeElectricalMeasurementOverloadAlarmsMask() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000513) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000700) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -80907,12 +89397,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterWithParams:params + [cluster subscribeAttributeOverloadAlarmsMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounter response %@", [value description]); + NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); SetCommandExitStatus(error); }]; @@ -80921,29 +89411,29 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounter : pub }; /* - * Attribute RmsExtremeOverVoltagePeriod + * Attribute VoltageOverload */ -class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribute { +class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltagePeriod() - : ReadAttribute("rms-extreme-over-voltage-period") + ReadElectricalMeasurementVoltageOverload() + : ReadAttribute("voltage-overload") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriod() {} + ~ReadElectricalMeasurementVoltageOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000514) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000701) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); + [cluster readAttributeVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriod read Error", error); + LogNSError("ElectricalMeasurement VoltageOverload read Error", error); } SetCommandExitStatus(error); }]; @@ -80951,61 +89441,18 @@ class ReadElectricalMeasurementRmsExtremeOverVoltagePeriod : public ReadAttribut } }; -class WriteElectricalMeasurementRmsExtremeOverVoltagePeriod : public WriteAttribute { -public: - WriteElectricalMeasurementRmsExtremeOverVoltagePeriod() - : WriteAttribute("rms-extreme-over-voltage-period") - { - AddArgument("attr-name", "rms-extreme-over-voltage-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsExtremeOverVoltagePeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000514) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeRmsExtremeOverVoltagePeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement RmsExtremeOverVoltagePeriod write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod() - : SubscribeAttribute("rms-extreme-over-voltage-period") + SubscribeAttributeElectricalMeasurementVoltageOverload() + : SubscribeAttribute("voltage-overload") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod() {} + ~SubscribeAttributeElectricalMeasurementVoltageOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000514) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000701) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81020,12 +89467,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodWithParams:params + [cluster subscribeAttributeVoltageOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriod response %@", [value description]); + NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81034,29 +89481,29 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriod : publi }; /* - * Attribute RmsExtremeUnderVoltagePeriod + * Attribute CurrentOverload */ -class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribute { +class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod() - : ReadAttribute("rms-extreme-under-voltage-period") + ReadElectricalMeasurementCurrentOverload() + : ReadAttribute("current-overload") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod() {} + ~ReadElectricalMeasurementCurrentOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000515) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000702) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltagePeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); + [cluster readAttributeCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriod read Error", error); + LogNSError("ElectricalMeasurement CurrentOverload read Error", error); } SetCommandExitStatus(error); }]; @@ -81064,61 +89511,18 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriod : public ReadAttribu } }; -class WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod : public WriteAttribute { -public: - WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod() - : WriteAttribute("rms-extreme-under-voltage-period") - { - AddArgument("attr-name", "rms-extreme-under-voltage-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementRmsExtremeUnderVoltagePeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000515) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeRmsExtremeUnderVoltagePeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError( - "ElectricalMeasurement RmsExtremeUnderVoltagePeriod write Error", - error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint16_t mValue; -}; - -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod() - : SubscribeAttribute("rms-extreme-under-voltage-period") + SubscribeAttributeElectricalMeasurementCurrentOverload() + : SubscribeAttribute("current-overload") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod() {} + ~SubscribeAttributeElectricalMeasurementCurrentOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000515) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000702) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81133,12 +89537,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodWithParams:params + [cluster subscribeAttributeCurrentOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriod response %@", [value description]); + NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81147,29 +89551,29 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriod : publ }; /* - * Attribute RmsVoltageSagPeriod + * Attribute AcOverloadAlarmsMask */ -class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { +class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSagPeriod() - : ReadAttribute("rms-voltage-sag-period") + ReadElectricalMeasurementAcOverloadAlarmsMask() + : ReadAttribute("ac-overload-alarms-mask") { } - ~ReadElectricalMeasurementRmsVoltageSagPeriod() {} + ~ReadElectricalMeasurementAcOverloadAlarmsMask() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000516) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000800) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); + [cluster readAttributeAcOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriod read Error", error); + LogNSError("ElectricalMeasurement AcOverloadAlarmsMask read Error", error); } SetCommandExitStatus(error); }]; @@ -81177,21 +89581,21 @@ class ReadElectricalMeasurementRmsVoltageSagPeriod : public ReadAttribute { } }; -class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { +class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { public: - WriteElectricalMeasurementRmsVoltageSagPeriod() - : WriteAttribute("rms-voltage-sag-period") + WriteElectricalMeasurementAcOverloadAlarmsMask() + : WriteAttribute("ac-overload-alarms-mask") { - AddArgument("attr-name", "rms-voltage-sag-period"); + AddArgument("attr-name", "ac-overload-alarms-mask"); AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteElectricalMeasurementRmsVoltageSagPeriod() {} + ~WriteElectricalMeasurementAcOverloadAlarmsMask() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000516) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000800) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81202,14 +89606,15 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeRmsVoltageSagPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + writeAttributeAcOverloadAlarmsMaskWithValue:value + params:params + completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } @@ -81217,18 +89622,18 @@ class WriteElectricalMeasurementRmsVoltageSagPeriod : public WriteAttribute { uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod() - : SubscribeAttribute("rms-voltage-sag-period") + SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask() + : SubscribeAttribute("ac-overload-alarms-mask") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod() {} + ~SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000516) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000800) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81243,12 +89648,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSagPeriodWithParams:params + [cluster subscribeAttributeAcOverloadAlarmsMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriod response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81257,89 +89662,48 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriod : public Subscr }; /* - * Attribute RmsVoltageSwellPeriod + * Attribute AcVoltageOverload */ -class ReadElectricalMeasurementRmsVoltageSwellPeriod : public ReadAttribute { -public: - ReadElectricalMeasurementRmsVoltageSwellPeriod() - : ReadAttribute("rms-voltage-swell-period") - { - } - - ~ReadElectricalMeasurementRmsVoltageSwellPeriod() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000517) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteElectricalMeasurementRmsVoltageSwellPeriod : public WriteAttribute { +class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { public: - WriteElectricalMeasurementRmsVoltageSwellPeriod() - : WriteAttribute("rms-voltage-swell-period") + ReadElectricalMeasurementAcVoltageOverload() + : ReadAttribute("ac-voltage-overload") { - AddArgument("attr-name", "rms-voltage-swell-period"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteElectricalMeasurementRmsVoltageSwellPeriod() {} + ~ReadElectricalMeasurementAcVoltageOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000517) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - - [cluster - writeAttributeRmsVoltageSwellPeriodWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriod write Error", error); - } - SetCommandExitStatus(error); - }]; + { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000801) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AcVoltageOverload read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod() - : SubscribeAttribute("rms-voltage-swell-period") + SubscribeAttributeElectricalMeasurementAcVoltageOverload() + : SubscribeAttribute("ac-voltage-overload") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod() {} + ~SubscribeAttributeElectricalMeasurementAcVoltageOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000517) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000801) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81354,12 +89718,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellPeriodWithParams:params + [cluster subscribeAttributeAcVoltageOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriod response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81368,29 +89732,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriod : public Subs }; /* - * Attribute AcVoltageMultiplier + * Attribute AcCurrentOverload */ -class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { +class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { public: - ReadElectricalMeasurementAcVoltageMultiplier() - : ReadAttribute("ac-voltage-multiplier") + ReadElectricalMeasurementAcCurrentOverload() + : ReadAttribute("ac-current-overload") { } - ~ReadElectricalMeasurementAcVoltageMultiplier() {} + ~ReadElectricalMeasurementAcCurrentOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000600) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000802) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); + [cluster readAttributeAcCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcVoltageMultiplier read Error", error); + LogNSError("ElectricalMeasurement AcCurrentOverload read Error", error); } SetCommandExitStatus(error); }]; @@ -81398,18 +89762,18 @@ class ReadElectricalMeasurementAcVoltageMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcVoltageMultiplier() - : SubscribeAttribute("ac-voltage-multiplier") + SubscribeAttributeElectricalMeasurementAcCurrentOverload() + : SubscribeAttribute("ac-current-overload") { } - ~SubscribeAttributeElectricalMeasurementAcVoltageMultiplier() {} + ~SubscribeAttributeElectricalMeasurementAcCurrentOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000600) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000802) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81424,12 +89788,12 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcVoltageMultiplierWithParams:params + [cluster subscribeAttributeAcCurrentOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81438,29 +89802,29 @@ class SubscribeAttributeElectricalMeasurementAcVoltageMultiplier : public Subscr }; /* - * Attribute AcVoltageDivisor + * Attribute AcActivePowerOverload */ -class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { +class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { public: - ReadElectricalMeasurementAcVoltageDivisor() - : ReadAttribute("ac-voltage-divisor") + ReadElectricalMeasurementAcActivePowerOverload() + : ReadAttribute("ac-active-power-overload") { } - ~ReadElectricalMeasurementAcVoltageDivisor() {} + ~ReadElectricalMeasurementAcActivePowerOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000601) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000803) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); + [cluster readAttributeAcActivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcVoltageDivisor read Error", error); + LogNSError("ElectricalMeasurement AcActivePowerOverload read Error", error); } SetCommandExitStatus(error); }]; @@ -81468,18 +89832,18 @@ class ReadElectricalMeasurementAcVoltageDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcVoltageDivisor() - : SubscribeAttribute("ac-voltage-divisor") + SubscribeAttributeElectricalMeasurementAcActivePowerOverload() + : SubscribeAttribute("ac-active-power-overload") { } - ~SubscribeAttributeElectricalMeasurementAcVoltageDivisor() {} + ~SubscribeAttributeElectricalMeasurementAcActivePowerOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000601) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000803) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81494,12 +89858,12 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcVoltageDivisorWithParams:params + [cluster subscribeAttributeAcActivePowerOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81508,29 +89872,29 @@ class SubscribeAttributeElectricalMeasurementAcVoltageDivisor : public Subscribe }; /* - * Attribute AcCurrentMultiplier + * Attribute AcReactivePowerOverload */ -class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { +class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { public: - ReadElectricalMeasurementAcCurrentMultiplier() - : ReadAttribute("ac-current-multiplier") + ReadElectricalMeasurementAcReactivePowerOverload() + : ReadAttribute("ac-reactive-power-overload") { } - ~ReadElectricalMeasurementAcCurrentMultiplier() {} + ~ReadElectricalMeasurementAcReactivePowerOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000602) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000804) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); + [cluster readAttributeAcReactivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcCurrentMultiplier read Error", error); + LogNSError("ElectricalMeasurement AcReactivePowerOverload read Error", error); } SetCommandExitStatus(error); }]; @@ -81538,18 +89902,18 @@ class ReadElectricalMeasurementAcCurrentMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcCurrentMultiplier() - : SubscribeAttribute("ac-current-multiplier") + SubscribeAttributeElectricalMeasurementAcReactivePowerOverload() + : SubscribeAttribute("ac-reactive-power-overload") { } - ~SubscribeAttributeElectricalMeasurementAcCurrentMultiplier() {} + ~SubscribeAttributeElectricalMeasurementAcReactivePowerOverload() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000602) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000804) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81564,12 +89928,12 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcCurrentMultiplierWithParams:params + [cluster subscribeAttributeAcReactivePowerOverloadWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81578,29 +89942,29 @@ class SubscribeAttributeElectricalMeasurementAcCurrentMultiplier : public Subscr }; /* - * Attribute AcCurrentDivisor + * Attribute AverageRmsOverVoltage */ -class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { public: - ReadElectricalMeasurementAcCurrentDivisor() - : ReadAttribute("ac-current-divisor") + ReadElectricalMeasurementAverageRmsOverVoltage() + : ReadAttribute("average-rms-over-voltage") { } - ~ReadElectricalMeasurementAcCurrentDivisor() {} + ~ReadElectricalMeasurementAverageRmsOverVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000603) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000805) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); + [cluster readAttributeAverageRmsOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcCurrentDivisor read Error", error); + LogNSError("ElectricalMeasurement AverageRmsOverVoltage read Error", error); } SetCommandExitStatus(error); }]; @@ -81608,18 +89972,18 @@ class ReadElectricalMeasurementAcCurrentDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcCurrentDivisor() - : SubscribeAttribute("ac-current-divisor") + SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage() + : SubscribeAttribute("average-rms-over-voltage") { } - ~SubscribeAttributeElectricalMeasurementAcCurrentDivisor() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000603) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000805) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81634,12 +89998,12 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcCurrentDivisorWithParams:params + [cluster subscribeAttributeAverageRmsOverVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81648,29 +90012,29 @@ class SubscribeAttributeElectricalMeasurementAcCurrentDivisor : public Subscribe }; /* - * Attribute AcPowerMultiplier + * Attribute AverageRmsUnderVoltage */ -class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { public: - ReadElectricalMeasurementAcPowerMultiplier() - : ReadAttribute("ac-power-multiplier") + ReadElectricalMeasurementAverageRmsUnderVoltage() + : ReadAttribute("average-rms-under-voltage") { } - ~ReadElectricalMeasurementAcPowerMultiplier() {} + ~ReadElectricalMeasurementAverageRmsUnderVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000604) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000806) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcPowerMultiplierWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); + [cluster readAttributeAverageRmsUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcPowerMultiplier read Error", error); + LogNSError("ElectricalMeasurement AverageRmsUnderVoltage read Error", error); } SetCommandExitStatus(error); }]; @@ -81678,18 +90042,18 @@ class ReadElectricalMeasurementAcPowerMultiplier : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcPowerMultiplier() - : SubscribeAttribute("ac-power-multiplier") + SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage() + : SubscribeAttribute("average-rms-under-voltage") { } - ~SubscribeAttributeElectricalMeasurementAcPowerMultiplier() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000604) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000806) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81704,12 +90068,12 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcPowerMultiplierWithParams:params + [cluster subscribeAttributeAverageRmsUnderVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerMultiplier response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81718,29 +90082,29 @@ class SubscribeAttributeElectricalMeasurementAcPowerMultiplier : public Subscrib }; /* - * Attribute AcPowerDivisor + * Attribute RmsExtremeOverVoltage */ -class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { public: - ReadElectricalMeasurementAcPowerDivisor() - : ReadAttribute("ac-power-divisor") + ReadElectricalMeasurementRmsExtremeOverVoltage() + : ReadAttribute("rms-extreme-over-voltage") { } - ~ReadElectricalMeasurementAcPowerDivisor() {} + ~ReadElectricalMeasurementRmsExtremeOverVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000605) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000807) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcPowerDivisorWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); + [cluster readAttributeRmsExtremeOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcPowerDivisor read Error", error); + LogNSError("ElectricalMeasurement RmsExtremeOverVoltage read Error", error); } SetCommandExitStatus(error); }]; @@ -81748,18 +90112,18 @@ class ReadElectricalMeasurementAcPowerDivisor : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcPowerDivisor() - : SubscribeAttribute("ac-power-divisor") + SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage() + : SubscribeAttribute("rms-extreme-over-voltage") { } - ~SubscribeAttributeElectricalMeasurementAcPowerDivisor() {} + ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000605) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000807) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81774,12 +90138,12 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcPowerDivisorWithParams:params + [cluster subscribeAttributeRmsExtremeOverVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcPowerDivisor response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81788,29 +90152,29 @@ class SubscribeAttributeElectricalMeasurementAcPowerDivisor : public SubscribeAt }; /* - * Attribute OverloadAlarmsMask + * Attribute RmsExtremeUnderVoltage */ -class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { public: - ReadElectricalMeasurementOverloadAlarmsMask() - : ReadAttribute("overload-alarms-mask") + ReadElectricalMeasurementRmsExtremeUnderVoltage() + : ReadAttribute("rms-extreme-under-voltage") { } - ~ReadElectricalMeasurementOverloadAlarmsMask() {} + ~ReadElectricalMeasurementRmsExtremeUnderVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000700) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000808) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); + [cluster readAttributeRmsExtremeUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement OverloadAlarmsMask read Error", error); + LogNSError("ElectricalMeasurement RmsExtremeUnderVoltage read Error", error); } SetCommandExitStatus(error); }]; @@ -81818,58 +90182,18 @@ class ReadElectricalMeasurementOverloadAlarmsMask : public ReadAttribute { } }; -class WriteElectricalMeasurementOverloadAlarmsMask : public WriteAttribute { -public: - WriteElectricalMeasurementOverloadAlarmsMask() - : WriteAttribute("overload-alarms-mask") - { - AddArgument("attr-name", "overload-alarms-mask"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteElectricalMeasurementOverloadAlarmsMask() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000700) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - - [cluster writeAttributeOverloadAlarmsMaskWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement OverloadAlarmsMask write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementOverloadAlarmsMask() - : SubscribeAttribute("overload-alarms-mask") + SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage() + : SubscribeAttribute("rms-extreme-under-voltage") { } - ~SubscribeAttributeElectricalMeasurementOverloadAlarmsMask() {} + ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000700) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000808) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81884,12 +90208,12 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverloadAlarmsMaskWithParams:params + [cluster subscribeAttributeRmsExtremeUnderVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.OverloadAlarmsMask response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81898,29 +90222,29 @@ class SubscribeAttributeElectricalMeasurementOverloadAlarmsMask : public Subscri }; /* - * Attribute VoltageOverload + * Attribute RmsVoltageSag */ -class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { public: - ReadElectricalMeasurementVoltageOverload() - : ReadAttribute("voltage-overload") + ReadElectricalMeasurementRmsVoltageSag() + : ReadAttribute("rms-voltage-sag") { } - ~ReadElectricalMeasurementVoltageOverload() {} + ~ReadElectricalMeasurementRmsVoltageSag() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000701) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000809) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); + [cluster readAttributeRmsVoltageSagWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement VoltageOverload read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSag read Error", error); } SetCommandExitStatus(error); }]; @@ -81928,18 +90252,18 @@ class ReadElectricalMeasurementVoltageOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementVoltageOverload() - : SubscribeAttribute("voltage-overload") + SubscribeAttributeElectricalMeasurementRmsVoltageSag() + : SubscribeAttribute("rms-voltage-sag") { } - ~SubscribeAttributeElectricalMeasurementVoltageOverload() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageSag() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000701) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000809) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -81954,12 +90278,12 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVoltageOverloadWithParams:params + [cluster subscribeAttributeRmsVoltageSagWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.VoltageOverload response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); SetCommandExitStatus(error); }]; @@ -81968,29 +90292,29 @@ class SubscribeAttributeElectricalMeasurementVoltageOverload : public SubscribeA }; /* - * Attribute CurrentOverload + * Attribute RmsVoltageSwell */ -class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { public: - ReadElectricalMeasurementCurrentOverload() - : ReadAttribute("current-overload") + ReadElectricalMeasurementRmsVoltageSwell() + : ReadAttribute("rms-voltage-swell") { } - ~ReadElectricalMeasurementCurrentOverload() {} + ~ReadElectricalMeasurementRmsVoltageSwell() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000702) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000080A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); + [cluster readAttributeRmsVoltageSwellWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement CurrentOverload read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSwell read Error", error); } SetCommandExitStatus(error); }]; @@ -81998,18 +90322,18 @@ class ReadElectricalMeasurementCurrentOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementCurrentOverload() - : SubscribeAttribute("current-overload") + SubscribeAttributeElectricalMeasurementRmsVoltageSwell() + : SubscribeAttribute("rms-voltage-swell") { } - ~SubscribeAttributeElectricalMeasurementCurrentOverload() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageSwell() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000702) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000080A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82024,12 +90348,12 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentOverloadWithParams:params + [cluster subscribeAttributeRmsVoltageSwellWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.CurrentOverload response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82038,29 +90362,29 @@ class SubscribeAttributeElectricalMeasurementCurrentOverload : public SubscribeA }; /* - * Attribute AcOverloadAlarmsMask + * Attribute LineCurrentPhaseB */ -class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { +class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementAcOverloadAlarmsMask() - : ReadAttribute("ac-overload-alarms-mask") + ReadElectricalMeasurementLineCurrentPhaseB() + : ReadAttribute("line-current-phase-b") { } - ~ReadElectricalMeasurementAcOverloadAlarmsMask() {} + ~ReadElectricalMeasurementLineCurrentPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000800) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000901) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcOverloadAlarmsMaskWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); + [cluster readAttributeLineCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcOverloadAlarmsMask read Error", error); + LogNSError("ElectricalMeasurement LineCurrentPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82068,59 +90392,88 @@ class ReadElectricalMeasurementAcOverloadAlarmsMask : public ReadAttribute { } }; -class WriteElectricalMeasurementAcOverloadAlarmsMask : public WriteAttribute { +class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public SubscribeAttribute { public: - WriteElectricalMeasurementAcOverloadAlarmsMask() - : WriteAttribute("ac-overload-alarms-mask") + SubscribeAttributeElectricalMeasurementLineCurrentPhaseB() + : SubscribeAttribute("line-current-phase-b") { - AddArgument("attr-name", "ac-overload-alarms-mask"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteElectricalMeasurementAcOverloadAlarmsMask() {} + ~SubscribeAttributeElectricalMeasurementLineCurrentPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) WriteAttribute (0x00000800) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000901) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWriteParams alloc] init]; - params.timedWriteTimeout - = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; - NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeLineCurrentPhaseBWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); + SetCommandExitStatus(error); + }]; - [cluster - writeAttributeAcOverloadAlarmsMaskWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("ElectricalMeasurement AcOverloadAlarmsMask write Error", error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } +}; -private: - uint16_t mValue; +/* + * Attribute ActiveCurrentPhaseB + */ +class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { +public: + ReadElectricalMeasurementActiveCurrentPhaseB() + : ReadAttribute("active-current-phase-b") + { + } + + ~ReadElectricalMeasurementActiveCurrentPhaseB() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000902) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeActiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement ActiveCurrentPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } }; -class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask() - : SubscribeAttribute("ac-overload-alarms-mask") + SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB() + : SubscribeAttribute("active-current-phase-b") { } - ~SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask() {} + ~SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000800) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000902) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82135,12 +90488,12 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcOverloadAlarmsMaskWithParams:params + [cluster subscribeAttributeActiveCurrentPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcOverloadAlarmsMask response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82149,29 +90502,29 @@ class SubscribeAttributeElectricalMeasurementAcOverloadAlarmsMask : public Subsc }; /* - * Attribute AcVoltageOverload + * Attribute ReactiveCurrentPhaseB */ -class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { +class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementAcVoltageOverload() - : ReadAttribute("ac-voltage-overload") + ReadElectricalMeasurementReactiveCurrentPhaseB() + : ReadAttribute("reactive-current-phase-b") { } - ~ReadElectricalMeasurementAcVoltageOverload() {} + ~ReadElectricalMeasurementReactiveCurrentPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000801) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000903) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcVoltageOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); + [cluster readAttributeReactiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcVoltageOverload read Error", error); + LogNSError("ElectricalMeasurement ReactiveCurrentPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82179,18 +90532,18 @@ class ReadElectricalMeasurementAcVoltageOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcVoltageOverload() - : SubscribeAttribute("ac-voltage-overload") + SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB() + : SubscribeAttribute("reactive-current-phase-b") { } - ~SubscribeAttributeElectricalMeasurementAcVoltageOverload() {} + ~SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000801) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000903) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82205,12 +90558,12 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcVoltageOverloadWithParams:params + [cluster subscribeAttributeReactiveCurrentPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcVoltageOverload response %@", [value description]); + NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82219,29 +90572,29 @@ class SubscribeAttributeElectricalMeasurementAcVoltageOverload : public Subscrib }; /* - * Attribute AcCurrentOverload + * Attribute RmsVoltagePhaseB */ -class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { public: - ReadElectricalMeasurementAcCurrentOverload() - : ReadAttribute("ac-current-overload") + ReadElectricalMeasurementRmsVoltagePhaseB() + : ReadAttribute("rms-voltage-phase-b") { } - ~ReadElectricalMeasurementAcCurrentOverload() {} + ~ReadElectricalMeasurementRmsVoltagePhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000802) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000905) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcCurrentOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); + [cluster readAttributeRmsVoltagePhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcCurrentOverload read Error", error); + LogNSError("ElectricalMeasurement RmsVoltagePhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82249,18 +90602,18 @@ class ReadElectricalMeasurementAcCurrentOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcCurrentOverload() - : SubscribeAttribute("ac-current-overload") + SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB() + : SubscribeAttribute("rms-voltage-phase-b") { } - ~SubscribeAttributeElectricalMeasurementAcCurrentOverload() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000802) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000905) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82275,12 +90628,12 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcCurrentOverloadWithParams:params + [cluster subscribeAttributeRmsVoltagePhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcCurrentOverload response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82289,29 +90642,29 @@ class SubscribeAttributeElectricalMeasurementAcCurrentOverload : public Subscrib }; /* - * Attribute AcActivePowerOverload + * Attribute RmsVoltageMinPhaseB */ -class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementAcActivePowerOverload() - : ReadAttribute("ac-active-power-overload") + ReadElectricalMeasurementRmsVoltageMinPhaseB() + : ReadAttribute("rms-voltage-min-phase-b") { } - ~ReadElectricalMeasurementAcActivePowerOverload() {} + ~ReadElectricalMeasurementRmsVoltageMinPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000803) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000906) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcActivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); + [cluster readAttributeRmsVoltageMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcActivePowerOverload read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageMinPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82319,18 +90672,18 @@ class ReadElectricalMeasurementAcActivePowerOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcActivePowerOverload() - : SubscribeAttribute("ac-active-power-overload") + SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB() + : SubscribeAttribute("rms-voltage-min-phase-b") { } - ~SubscribeAttributeElectricalMeasurementAcActivePowerOverload() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000803) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000906) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82345,12 +90698,12 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcActivePowerOverloadWithParams:params + [cluster subscribeAttributeRmsVoltageMinPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcActivePowerOverload response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82359,29 +90712,29 @@ class SubscribeAttributeElectricalMeasurementAcActivePowerOverload : public Subs }; /* - * Attribute AcReactivePowerOverload + * Attribute RmsVoltageMaxPhaseB */ -class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementAcReactivePowerOverload() - : ReadAttribute("ac-reactive-power-overload") + ReadElectricalMeasurementRmsVoltageMaxPhaseB() + : ReadAttribute("rms-voltage-max-phase-b") { } - ~ReadElectricalMeasurementAcReactivePowerOverload() {} + ~ReadElectricalMeasurementRmsVoltageMaxPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000804) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000907) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcReactivePowerOverloadWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); + [cluster readAttributeRmsVoltageMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcReactivePowerOverload read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82389,18 +90742,18 @@ class ReadElectricalMeasurementAcReactivePowerOverload : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcReactivePowerOverload() - : SubscribeAttribute("ac-reactive-power-overload") + SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB() + : SubscribeAttribute("rms-voltage-max-phase-b") { } - ~SubscribeAttributeElectricalMeasurementAcReactivePowerOverload() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000804) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000907) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82415,12 +90768,12 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcReactivePowerOverloadWithParams:params + [cluster subscribeAttributeRmsVoltageMaxPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcReactivePowerOverload response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82429,29 +90782,29 @@ class SubscribeAttributeElectricalMeasurementAcReactivePowerOverload : public Su }; /* - * Attribute AverageRmsOverVoltage + * Attribute RmsCurrentPhaseB */ -class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsOverVoltage() - : ReadAttribute("average-rms-over-voltage") + ReadElectricalMeasurementRmsCurrentPhaseB() + : ReadAttribute("rms-current-phase-b") { } - ~ReadElectricalMeasurementAverageRmsOverVoltage() {} + ~ReadElectricalMeasurementRmsCurrentPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000805) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000908) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); + [cluster readAttributeRmsCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsOverVoltage read Error", error); + LogNSError("ElectricalMeasurement RmsCurrentPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82459,18 +90812,18 @@ class ReadElectricalMeasurementAverageRmsOverVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage() - : SubscribeAttribute("average-rms-over-voltage") + SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB() + : SubscribeAttribute("rms-current-phase-b") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000805) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000908) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82485,12 +90838,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsOverVoltageWithParams:params + [cluster subscribeAttributeRmsCurrentPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltage response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82499,29 +90852,29 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltage : public Subs }; /* - * Attribute AverageRmsUnderVoltage + * Attribute RmsCurrentMinPhaseB */ -class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsUnderVoltage() - : ReadAttribute("average-rms-under-voltage") + ReadElectricalMeasurementRmsCurrentMinPhaseB() + : ReadAttribute("rms-current-min-phase-b") { } - ~ReadElectricalMeasurementAverageRmsUnderVoltage() {} + ~ReadElectricalMeasurementRmsCurrentMinPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000806) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000909) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); + [cluster readAttributeRmsCurrentMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltage read Error", error); + LogNSError("ElectricalMeasurement RmsCurrentMinPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82529,18 +90882,18 @@ class ReadElectricalMeasurementAverageRmsUnderVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage() - : SubscribeAttribute("average-rms-under-voltage") + SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB() + : SubscribeAttribute("rms-current-min-phase-b") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000806) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000909) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82555,12 +90908,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageWithParams:params + [cluster subscribeAttributeRmsCurrentMinPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltage response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82569,29 +90922,29 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltage : public Sub }; /* - * Attribute RmsExtremeOverVoltage + * Attribute RmsCurrentMaxPhaseB */ -class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltage() - : ReadAttribute("rms-extreme-over-voltage") + ReadElectricalMeasurementRmsCurrentMaxPhaseB() + : ReadAttribute("rms-current-max-phase-b") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltage() {} + ~ReadElectricalMeasurementRmsCurrentMaxPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000807) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeOverVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); + [cluster readAttributeRmsCurrentMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltage read Error", error); + LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82599,18 +90952,18 @@ class ReadElectricalMeasurementRmsExtremeOverVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage() - : SubscribeAttribute("rms-extreme-over-voltage") + SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB() + : SubscribeAttribute("rms-current-max-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000807) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82625,12 +90978,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltageWithParams:params + [cluster subscribeAttributeRmsCurrentMaxPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltage response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82639,29 +90992,29 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltage : public Subs }; /* - * Attribute RmsExtremeUnderVoltage + * Attribute ActivePowerPhaseB */ -class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { +class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltage() - : ReadAttribute("rms-extreme-under-voltage") + ReadElectricalMeasurementActivePowerPhaseB() + : ReadAttribute("active-power-phase-b") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltage() {} + ~ReadElectricalMeasurementActivePowerPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000808) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsExtremeUnderVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); + [cluster readAttributeActivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltage read Error", error); + LogNSError("ElectricalMeasurement ActivePowerPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82669,18 +91022,18 @@ class ReadElectricalMeasurementRmsExtremeUnderVoltage : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage() - : SubscribeAttribute("rms-extreme-under-voltage") + SubscribeAttributeElectricalMeasurementActivePowerPhaseB() + : SubscribeAttribute("active-power-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage() {} + ~SubscribeAttributeElectricalMeasurementActivePowerPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000808) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82695,12 +91048,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltageWithParams:params + [cluster subscribeAttributeActivePowerPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltage response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82709,29 +91062,29 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltage : public Sub }; /* - * Attribute RmsVoltageSag + * Attribute ActivePowerMinPhaseB */ -class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { +class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSag() - : ReadAttribute("rms-voltage-sag") + ReadElectricalMeasurementActivePowerMinPhaseB() + : ReadAttribute("active-power-min-phase-b") { } - ~ReadElectricalMeasurementRmsVoltageSag() {} + ~ReadElectricalMeasurementActivePowerMinPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000809) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); + [cluster readAttributeActivePowerMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSag read Error", error); + LogNSError("ElectricalMeasurement ActivePowerMinPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82739,18 +91092,18 @@ class ReadElectricalMeasurementRmsVoltageSag : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSag() - : SubscribeAttribute("rms-voltage-sag") + SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB() + : SubscribeAttribute("active-power-min-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSag() {} + ~SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000809) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82765,12 +91118,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSagWithParams:params + [cluster subscribeAttributeActivePowerMinPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSag response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82779,29 +91132,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSag : public SubscribeAtt }; /* - * Attribute RmsVoltageSwell + * Attribute ActivePowerMaxPhaseB */ -class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { +class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSwell() - : ReadAttribute("rms-voltage-swell") + ReadElectricalMeasurementActivePowerMaxPhaseB() + : ReadAttribute("active-power-max-phase-b") { } - ~ReadElectricalMeasurementRmsVoltageSwell() {} + ~ReadElectricalMeasurementActivePowerMaxPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000080A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); + [cluster readAttributeActivePowerMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwell read Error", error); + LogNSError("ElectricalMeasurement ActivePowerMaxPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82809,18 +91162,18 @@ class ReadElectricalMeasurementRmsVoltageSwell : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwell() - : SubscribeAttribute("rms-voltage-swell") + SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB() + : SubscribeAttribute("active-power-max-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwell() {} + ~SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000080A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82835,12 +91188,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellWithParams:params + [cluster subscribeAttributeActivePowerMaxPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwell response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82849,29 +91202,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwell : public SubscribeA }; /* - * Attribute LineCurrentPhaseB + * Attribute ReactivePowerPhaseB */ -class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { +class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementLineCurrentPhaseB() - : ReadAttribute("line-current-phase-b") + ReadElectricalMeasurementReactivePowerPhaseB() + : ReadAttribute("reactive-power-phase-b") { } - ~ReadElectricalMeasurementLineCurrentPhaseB() {} + ~ReadElectricalMeasurementReactivePowerPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000901) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); + [cluster readAttributeReactivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement LineCurrentPhaseB read Error", error); + LogNSError("ElectricalMeasurement ReactivePowerPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82879,18 +91232,18 @@ class ReadElectricalMeasurementLineCurrentPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementLineCurrentPhaseB() - : SubscribeAttribute("line-current-phase-b") + SubscribeAttributeElectricalMeasurementReactivePowerPhaseB() + : SubscribeAttribute("reactive-power-phase-b") { } - ~SubscribeAttributeElectricalMeasurementLineCurrentPhaseB() {} + ~SubscribeAttributeElectricalMeasurementReactivePowerPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000901) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82905,12 +91258,12 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLineCurrentPhaseBWithParams:params + [cluster subscribeAttributeReactivePowerPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82919,29 +91272,29 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseB : public Subscrib }; /* - * Attribute ActiveCurrentPhaseB + * Attribute ApparentPowerPhaseB */ -class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { +class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementActiveCurrentPhaseB() - : ReadAttribute("active-current-phase-b") + ReadElectricalMeasurementApparentPowerPhaseB() + : ReadAttribute("apparent-power-phase-b") { } - ~ReadElectricalMeasurementActiveCurrentPhaseB() {} + ~ReadElectricalMeasurementApparentPowerPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000902) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); + [cluster readAttributeApparentPowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActiveCurrentPhaseB read Error", error); + LogNSError("ElectricalMeasurement ApparentPowerPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -82949,18 +91302,18 @@ class ReadElectricalMeasurementActiveCurrentPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB() - : SubscribeAttribute("active-current-phase-b") + SubscribeAttributeElectricalMeasurementApparentPowerPhaseB() + : SubscribeAttribute("apparent-power-phase-b") { } - ~SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB() {} + ~SubscribeAttributeElectricalMeasurementApparentPowerPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000902) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -82975,12 +91328,12 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveCurrentPhaseBWithParams:params + [cluster subscribeAttributeApparentPowerPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -82989,29 +91342,29 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseB : public Subscr }; /* - * Attribute ReactiveCurrentPhaseB + * Attribute PowerFactorPhaseB */ -class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { +class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementReactiveCurrentPhaseB() - : ReadAttribute("reactive-current-phase-b") + ReadElectricalMeasurementPowerFactorPhaseB() + : ReadAttribute("power-factor-phase-b") { } - ~ReadElectricalMeasurementReactiveCurrentPhaseB() {} + ~ReadElectricalMeasurementPowerFactorPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000903) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000910) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); + [cluster readAttributePowerFactorPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ReactiveCurrentPhaseB read Error", error); + LogNSError("ElectricalMeasurement PowerFactorPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -83019,18 +91372,18 @@ class ReadElectricalMeasurementReactiveCurrentPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB() - : SubscribeAttribute("reactive-current-phase-b") + SubscribeAttributeElectricalMeasurementPowerFactorPhaseB() + : SubscribeAttribute("power-factor-phase-b") { } - ~SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB() {} + ~SubscribeAttributeElectricalMeasurementPowerFactorPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000903) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000910) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83045,12 +91398,12 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactiveCurrentPhaseBWithParams:params + [cluster subscribeAttributePowerFactorPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83059,29 +91412,30 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseB : public Subs }; /* - * Attribute RmsVoltagePhaseB + * Attribute AverageRmsVoltageMeasurementPeriodPhaseB */ -class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltagePhaseB() - : ReadAttribute("rms-voltage-phase-b") + ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() + : ReadAttribute("average-rms-voltage-measurement-period-phase-b") { } - ~ReadElectricalMeasurementRmsVoltagePhaseB() {} + ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000905) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000911) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); + [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltagePhaseB read Error", error); + LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -83089,18 +91443,18 @@ class ReadElectricalMeasurementRmsVoltagePhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB() - : SubscribeAttribute("rms-voltage-phase-b") + SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() + : SubscribeAttribute("average-rms-voltage-measurement-period-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000905) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000911) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83115,12 +91469,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltagePhaseBWithParams:params + [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83129,48 +91483,49 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseB : public Subscribe }; /* - * Attribute RmsVoltageMinPhaseB + * Attribute AverageRmsOverVoltageCounterPhaseB */ -class ReadElectricalMeasurementRmsVoltageMinPhaseB : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMinPhaseB() - : ReadAttribute("rms-voltage-min-phase-b") + ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() + : ReadAttribute("average-rms-over-voltage-counter-phase-b") { } - ~ReadElectricalMeasurementRmsVoltageMinPhaseB() {} + ~ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000906) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000912) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageMinPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB() - : SubscribeAttribute("rms-voltage-min-phase-b") + SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() + : SubscribeAttribute("average-rms-over-voltage-counter-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000906) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000912) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83185,12 +91540,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMinPhaseBWithParams:params + [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83199,29 +91554,30 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseB : public Subscr }; /* - * Attribute RmsVoltageMaxPhaseB + * Attribute AverageRmsUnderVoltageCounterPhaseB */ -class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMaxPhaseB() - : ReadAttribute("rms-voltage-max-phase-b") + ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() + : ReadAttribute("average-rms-under-voltage-counter-phase-b") { } - ~ReadElectricalMeasurementRmsVoltageMaxPhaseB() {} + ~ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000907) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000913) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); + [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseB read Error", error); + LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -83229,18 +91585,18 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB() - : SubscribeAttribute("rms-voltage-max-phase-b") + SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() + : SubscribeAttribute("average-rms-under-voltage-counter-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000907) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000913) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83255,12 +91611,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMaxPhaseBWithParams:params + [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83269,48 +91625,49 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseB : public Subscr }; /* - * Attribute RmsCurrentPhaseB + * Attribute RmsExtremeOverVoltagePeriodPhaseB */ -class ReadElectricalMeasurementRmsCurrentPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentPhaseB() - : ReadAttribute("rms-current-phase-b") + ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() + : ReadAttribute("rms-extreme-over-voltage-period-phase-b") { } - ~ReadElectricalMeasurementRmsCurrentPhaseB() {} + ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000908) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000914) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB() - : SubscribeAttribute("rms-current-phase-b") + SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() + : SubscribeAttribute("rms-extreme-over-voltage-period-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000908) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000914) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83325,12 +91682,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentPhaseBWithParams:params + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83339,48 +91696,49 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseB : public Subscribe }; /* - * Attribute RmsCurrentMinPhaseB + * Attribute RmsExtremeUnderVoltagePeriodPhaseB */ -class ReadElectricalMeasurementRmsCurrentMinPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMinPhaseB() - : ReadAttribute("rms-current-min-phase-b") + ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() + : ReadAttribute("rms-extreme-under-voltage-period-phase-b") { } - ~ReadElectricalMeasurementRmsCurrentMinPhaseB() {} + ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000909) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000915) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentMinPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseB read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB() - : SubscribeAttribute("rms-current-min-phase-b") + SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() + : SubscribeAttribute("rms-extreme-under-voltage-period-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000909) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000915) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83395,12 +91753,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMinPhaseBWithParams:params + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83409,29 +91767,29 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseB : public Subscr }; /* - * Attribute RmsCurrentMaxPhaseB + * Attribute RmsVoltageSagPeriodPhaseB */ -class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMaxPhaseB() - : ReadAttribute("rms-current-max-phase-b") + ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB() + : ReadAttribute("rms-voltage-sag-period-phase-b") { } - ~ReadElectricalMeasurementRmsCurrentMaxPhaseB() {} + ~ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000916) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); + [cluster readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseB read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -83439,18 +91797,18 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB() - : SubscribeAttribute("rms-current-max-phase-b") + SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB() + : SubscribeAttribute("rms-voltage-sag-period-phase-b") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000916) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83465,12 +91823,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMaxPhaseBWithParams:params + [cluster subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83479,29 +91837,29 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseB : public Subscr }; /* - * Attribute ActivePowerPhaseB + * Attribute RmsVoltageSwellPeriodPhaseB */ -class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerPhaseB() - : ReadAttribute("active-power-phase-b") + ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB() + : ReadAttribute("rms-voltage-swell-period-phase-b") { } - ~ReadElectricalMeasurementActivePowerPhaseB() {} + ~ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000917) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); + [cluster readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerPhaseB read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseB read Error", error); } SetCommandExitStatus(error); }]; @@ -83509,18 +91867,18 @@ class ReadElectricalMeasurementActivePowerPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerPhaseB() - : SubscribeAttribute("active-power-phase-b") + SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB() + : SubscribeAttribute("rms-voltage-swell-period-phase-b") { } - ~SubscribeAttributeElectricalMeasurementActivePowerPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000917) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83535,12 +91893,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerPhaseBWithParams:params + [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83549,29 +91907,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseB : public Subscrib }; /* - * Attribute ActivePowerMinPhaseB + * Attribute LineCurrentPhaseC */ -class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { +class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMinPhaseB() - : ReadAttribute("active-power-min-phase-b") + ReadElectricalMeasurementLineCurrentPhaseC() + : ReadAttribute("line-current-phase-c") { } - ~ReadElectricalMeasurementActivePowerMinPhaseB() {} + ~ReadElectricalMeasurementLineCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A01) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); + [cluster readAttributeLineCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerMinPhaseB read Error", error); + LogNSError("ElectricalMeasurement LineCurrentPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -83579,18 +91937,18 @@ class ReadElectricalMeasurementActivePowerMinPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB() - : SubscribeAttribute("active-power-min-phase-b") + SubscribeAttributeElectricalMeasurementLineCurrentPhaseC() + : SubscribeAttribute("line-current-phase-c") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB() {} + ~SubscribeAttributeElectricalMeasurementLineCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A01) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83605,12 +91963,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMinPhaseBWithParams:params + [cluster subscribeAttributeLineCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83619,29 +91977,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseB : public Subsc }; /* - * Attribute ActivePowerMaxPhaseB + * Attribute ActiveCurrentPhaseC */ -class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { +class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMaxPhaseB() - : ReadAttribute("active-power-max-phase-b") + ReadElectricalMeasurementActiveCurrentPhaseC() + : ReadAttribute("active-current-phase-c") { } - ~ReadElectricalMeasurementActivePowerMaxPhaseB() {} + ~ReadElectricalMeasurementActiveCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A02) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); + [cluster readAttributeActiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerMaxPhaseB read Error", error); + LogNSError("ElectricalMeasurement ActiveCurrentPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -83649,18 +92007,18 @@ class ReadElectricalMeasurementActivePowerMaxPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB() - : SubscribeAttribute("active-power-max-phase-b") + SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC() + : SubscribeAttribute("active-current-phase-c") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB() {} + ~SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A02) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83675,12 +92033,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMaxPhaseBWithParams:params + [cluster subscribeAttributeActiveCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83689,29 +92047,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseB : public Subsc }; /* - * Attribute ReactivePowerPhaseB + * Attribute ReactiveCurrentPhaseC */ -class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { +class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementReactivePowerPhaseB() - : ReadAttribute("reactive-power-phase-b") + ReadElectricalMeasurementReactiveCurrentPhaseC() + : ReadAttribute("reactive-current-phase-c") { } - ~ReadElectricalMeasurementReactivePowerPhaseB() {} + ~ReadElectricalMeasurementReactiveCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A03) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); + [cluster readAttributeReactiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ReactivePowerPhaseB read Error", error); + LogNSError("ElectricalMeasurement ReactiveCurrentPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -83719,18 +92077,18 @@ class ReadElectricalMeasurementReactivePowerPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactivePowerPhaseB() - : SubscribeAttribute("reactive-power-phase-b") + SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC() + : SubscribeAttribute("reactive-current-phase-c") { } - ~SubscribeAttributeElectricalMeasurementReactivePowerPhaseB() {} + ~SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A03) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83745,12 +92103,12 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactivePowerPhaseBWithParams:params + [cluster subscribeAttributeReactiveCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83759,29 +92117,29 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseB : public Subscr }; /* - * Attribute ApparentPowerPhaseB + * Attribute RmsVoltagePhaseC */ -class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { public: - ReadElectricalMeasurementApparentPowerPhaseB() - : ReadAttribute("apparent-power-phase-b") + ReadElectricalMeasurementRmsVoltagePhaseC() + : ReadAttribute("rms-voltage-phase-c") { } - ~ReadElectricalMeasurementApparentPowerPhaseB() {} + ~ReadElectricalMeasurementRmsVoltagePhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000090F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A05) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); + [cluster readAttributeRmsVoltagePhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ApparentPowerPhaseB read Error", error); + LogNSError("ElectricalMeasurement RmsVoltagePhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -83789,18 +92147,18 @@ class ReadElectricalMeasurementApparentPowerPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementApparentPowerPhaseB() - : SubscribeAttribute("apparent-power-phase-b") + SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC() + : SubscribeAttribute("rms-voltage-phase-c") { } - ~SubscribeAttributeElectricalMeasurementApparentPowerPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000090F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A05) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83815,12 +92173,12 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApparentPowerPhaseBWithParams:params + [cluster subscribeAttributeRmsVoltagePhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83829,29 +92187,29 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseB : public Subscr }; /* - * Attribute PowerFactorPhaseB + * Attribute RmsVoltageMinPhaseC */ -class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementPowerFactorPhaseB() - : ReadAttribute("power-factor-phase-b") + ReadElectricalMeasurementRmsVoltageMinPhaseC() + : ReadAttribute("rms-voltage-min-phase-c") { } - ~ReadElectricalMeasurementPowerFactorPhaseB() {} + ~ReadElectricalMeasurementRmsVoltageMinPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000910) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A06) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); + [cluster readAttributeRmsVoltageMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement PowerFactorPhaseB read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageMinPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -83859,18 +92217,18 @@ class ReadElectricalMeasurementPowerFactorPhaseB : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerFactorPhaseB() - : SubscribeAttribute("power-factor-phase-b") + SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC() + : SubscribeAttribute("rms-voltage-min-phase-c") { } - ~SubscribeAttributeElectricalMeasurementPowerFactorPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000910) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A06) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83885,12 +92243,12 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerFactorPhaseBWithParams:params + [cluster subscribeAttributeRmsVoltageMinPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83899,30 +92257,29 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseB : public Subscrib }; /* - * Attribute AverageRmsVoltageMeasurementPeriodPhaseB + * Attribute RmsVoltageMaxPhaseC */ -class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() - : ReadAttribute("average-rms-voltage-measurement-period-phase-b") + ReadElectricalMeasurementRmsVoltageMaxPhaseC() + : ReadAttribute("rms-voltage-max-phase-c") { } - ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() {} + ~ReadElectricalMeasurementRmsVoltageMaxPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000911) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A07) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); + [cluster readAttributeRmsVoltageMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseB read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -83930,18 +92287,18 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public } }; -class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() - : SubscribeAttribute("average-rms-voltage-measurement-period-phase-b") + SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC() + : SubscribeAttribute("rms-voltage-max-phase-c") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000911) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A07) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -83956,12 +92313,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseBWithParams:params + [cluster subscribeAttributeRmsVoltageMaxPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -83970,49 +92327,48 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP }; /* - * Attribute AverageRmsOverVoltageCounterPhaseB + * Attribute RmsCurrentPhaseC */ -class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() - : ReadAttribute("average-rms-over-voltage-counter-phase-b") + ReadElectricalMeasurementRmsCurrentPhaseC() + : ReadAttribute("rms-current-phase-c") { } - ~ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() {} + ~ReadElectricalMeasurementRmsCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000912) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A08) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeAverageRmsOverVoltageCounterPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsCurrentPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() - : SubscribeAttribute("average-rms-over-voltage-counter-phase-b") + SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC() + : SubscribeAttribute("rms-current-phase-c") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000912) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A08) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84027,12 +92383,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseBWithParams:params + [cluster subscribeAttributeRmsCurrentPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84041,30 +92397,29 @@ class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseB }; /* - * Attribute AverageRmsUnderVoltageCounterPhaseB + * Attribute RmsCurrentMinPhaseC */ -class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() - : ReadAttribute("average-rms-under-voltage-counter-phase-b") + ReadElectricalMeasurementRmsCurrentMinPhaseC() + : ReadAttribute("rms-current-min-phase-c") { } - ~ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() {} + ~ReadElectricalMeasurementRmsCurrentMinPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000913) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A09) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseBWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); + [cluster readAttributeRmsCurrentMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseB read Error", error); + LogNSError("ElectricalMeasurement RmsCurrentMinPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84072,18 +92427,18 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public Read } }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() - : SubscribeAttribute("average-rms-under-voltage-counter-phase-b") + SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC() + : SubscribeAttribute("rms-current-min-phase-c") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000913) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A09) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84098,12 +92453,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseBWithParams:params + [cluster subscribeAttributeRmsCurrentMinPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84112,49 +92467,48 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseB }; /* - * Attribute RmsExtremeOverVoltagePeriodPhaseB + * Attribute RmsCurrentMaxPhaseC */ -class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public ReadAttribute { +class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() - : ReadAttribute("rms-extreme-over-voltage-period-phase-b") + ReadElectricalMeasurementRmsCurrentMaxPhaseC() + : ReadAttribute("rms-current-max-phase-c") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() {} + ~ReadElectricalMeasurementRmsCurrentMaxPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000914) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRmsExtremeOverVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeRmsCurrentMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() - : SubscribeAttribute("rms-extreme-over-voltage-period-phase-b") + SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC() + : SubscribeAttribute("rms-current-max-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB() {} + ~SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000914) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0A) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84169,12 +92523,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseBWithParams:params + [cluster subscribeAttributeRmsCurrentMaxPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84183,49 +92537,48 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseB : }; /* - * Attribute RmsExtremeUnderVoltagePeriodPhaseB + * Attribute ActivePowerPhaseC */ -class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public ReadAttribute { +class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() - : ReadAttribute("rms-extreme-under-voltage-period-phase-b") + ReadElectricalMeasurementActivePowerPhaseC() + : ReadAttribute("active-power-phase-c") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() {} + ~ReadElectricalMeasurementActivePowerPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000915) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster - readAttributeRmsExtremeUnderVoltagePeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseB read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster readAttributeActivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement ActivePowerPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() - : SubscribeAttribute("rms-extreme-under-voltage-period-phase-b") + SubscribeAttributeElectricalMeasurementActivePowerPhaseC() + : SubscribeAttribute("active-power-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB() {} + ~SubscribeAttributeElectricalMeasurementActivePowerPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000915) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0B) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84240,12 +92593,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseBWithParams:params + [cluster subscribeAttributeActivePowerPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84254,29 +92607,29 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseB }; /* - * Attribute RmsVoltageSagPeriodPhaseB + * Attribute ActivePowerMinPhaseC */ -class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute { +class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB() - : ReadAttribute("rms-voltage-sag-period-phase-b") + ReadElectricalMeasurementActivePowerMinPhaseC() + : ReadAttribute("active-power-min-phase-c") { } - ~ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB() {} + ~ReadElectricalMeasurementActivePowerMinPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000916) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); + [cluster readAttributeActivePowerMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseB read Error", error); + LogNSError("ElectricalMeasurement ActivePowerMinPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84284,18 +92637,18 @@ class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseB : public ReadAttribute } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB() - : SubscribeAttribute("rms-voltage-sag-period-phase-b") + SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC() + : SubscribeAttribute("active-power-min-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB() {} + ~SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000916) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0C) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84310,12 +92663,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseBWithParams:params + [cluster subscribeAttributeActivePowerMinPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84324,29 +92677,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseB : public }; /* - * Attribute RmsVoltageSwellPeriodPhaseB + * Attribute ActivePowerMaxPhaseC */ -class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribute { +class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB() - : ReadAttribute("rms-voltage-swell-period-phase-b") + ReadElectricalMeasurementActivePowerMaxPhaseC() + : ReadAttribute("active-power-max-phase-c") { } - ~ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB() {} + ~ReadElectricalMeasurementActivePowerMaxPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000917) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodPhaseBWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); + [cluster readAttributeActivePowerMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseB read Error", error); + LogNSError("ElectricalMeasurement ActivePowerMaxPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84354,18 +92707,18 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public ReadAttribut } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB() - : SubscribeAttribute("rms-voltage-swell-period-phase-b") + SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC() + : SubscribeAttribute("active-power-max-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB() {} + ~SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000917) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0D) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84380,12 +92733,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseBWithParams:params + [cluster subscribeAttributeActivePowerMaxPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseB response %@", [value description]); + NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84394,29 +92747,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseB : publi }; /* - * Attribute LineCurrentPhaseC + * Attribute ReactivePowerPhaseC */ -class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { +class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementLineCurrentPhaseC() - : ReadAttribute("line-current-phase-c") + ReadElectricalMeasurementReactivePowerPhaseC() + : ReadAttribute("reactive-power-phase-c") { } - ~ReadElectricalMeasurementLineCurrentPhaseC() {} + ~ReadElectricalMeasurementReactivePowerPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A01) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLineCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); + [cluster readAttributeReactivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement LineCurrentPhaseC read Error", error); + LogNSError("ElectricalMeasurement ReactivePowerPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84424,18 +92777,18 @@ class ReadElectricalMeasurementLineCurrentPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementLineCurrentPhaseC() - : SubscribeAttribute("line-current-phase-c") + SubscribeAttributeElectricalMeasurementReactivePowerPhaseC() + : SubscribeAttribute("reactive-power-phase-c") { } - ~SubscribeAttributeElectricalMeasurementLineCurrentPhaseC() {} + ~SubscribeAttributeElectricalMeasurementReactivePowerPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A01) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0E) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84450,12 +92803,12 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLineCurrentPhaseCWithParams:params + [cluster subscribeAttributeReactivePowerPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.LineCurrentPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84464,29 +92817,29 @@ class SubscribeAttributeElectricalMeasurementLineCurrentPhaseC : public Subscrib }; /* - * Attribute ActiveCurrentPhaseC + * Attribute ApparentPowerPhaseC */ -class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { +class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementActiveCurrentPhaseC() - : ReadAttribute("active-current-phase-c") + ReadElectricalMeasurementApparentPowerPhaseC() + : ReadAttribute("apparent-power-phase-c") { } - ~ReadElectricalMeasurementActiveCurrentPhaseC() {} + ~ReadElectricalMeasurementApparentPowerPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A02) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); + [cluster readAttributeApparentPowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActiveCurrentPhaseC read Error", error); + LogNSError("ElectricalMeasurement ApparentPowerPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84494,18 +92847,18 @@ class ReadElectricalMeasurementActiveCurrentPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC() - : SubscribeAttribute("active-current-phase-c") + SubscribeAttributeElectricalMeasurementApparentPowerPhaseC() + : SubscribeAttribute("apparent-power-phase-c") { } - ~SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC() {} + ~SubscribeAttributeElectricalMeasurementApparentPowerPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A02) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0F) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84520,12 +92873,12 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveCurrentPhaseCWithParams:params + [cluster subscribeAttributeApparentPowerPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActiveCurrentPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84534,29 +92887,29 @@ class SubscribeAttributeElectricalMeasurementActiveCurrentPhaseC : public Subscr }; /* - * Attribute ReactiveCurrentPhaseC + * Attribute PowerFactorPhaseC */ -class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { +class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementReactiveCurrentPhaseC() - : ReadAttribute("reactive-current-phase-c") + ReadElectricalMeasurementPowerFactorPhaseC() + : ReadAttribute("power-factor-phase-c") { } - ~ReadElectricalMeasurementReactiveCurrentPhaseC() {} + ~ReadElectricalMeasurementPowerFactorPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A03) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A10) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactiveCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); + [cluster readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ReactiveCurrentPhaseC read Error", error); + LogNSError("ElectricalMeasurement PowerFactorPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84564,18 +92917,18 @@ class ReadElectricalMeasurementReactiveCurrentPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC() - : SubscribeAttribute("reactive-current-phase-c") + SubscribeAttributeElectricalMeasurementPowerFactorPhaseC() + : SubscribeAttribute("power-factor-phase-c") { } - ~SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC() {} + ~SubscribeAttributeElectricalMeasurementPowerFactorPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A03) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A10) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84590,12 +92943,12 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactiveCurrentPhaseCWithParams:params + [cluster subscribeAttributePowerFactorPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactiveCurrentPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84604,29 +92957,30 @@ class SubscribeAttributeElectricalMeasurementReactiveCurrentPhaseC : public Subs }; /* - * Attribute RmsVoltagePhaseC + * Attribute AverageRmsVoltageMeasurementPeriodPhaseC */ -class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltagePhaseC() - : ReadAttribute("rms-voltage-phase-c") + ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() + : ReadAttribute("average-rms-voltage-measurement-period-phase-c") { } - ~ReadElectricalMeasurementRmsVoltagePhaseC() {} + ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A05) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A11) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltagePhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); + [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltagePhaseC read Error", error); + LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84634,18 +92988,18 @@ class ReadElectricalMeasurementRmsVoltagePhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC() - : SubscribeAttribute("rms-voltage-phase-c") + SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() + : SubscribeAttribute("average-rms-voltage-measurement-period-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A05) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A11) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84660,12 +93014,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltagePhaseCWithParams:params + [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltagePhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84674,48 +93028,49 @@ class SubscribeAttributeElectricalMeasurementRmsVoltagePhaseC : public Subscribe }; /* - * Attribute RmsVoltageMinPhaseC + * Attribute AverageRmsOverVoltageCounterPhaseC */ -class ReadElectricalMeasurementRmsVoltageMinPhaseC : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMinPhaseC() - : ReadAttribute("rms-voltage-min-phase-c") + ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() + : ReadAttribute("average-rms-over-voltage-counter-phase-c") { } - ~ReadElectricalMeasurementRmsVoltageMinPhaseC() {} + ~ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A06) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A12) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageMinPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC() - : SubscribeAttribute("rms-voltage-min-phase-c") + SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() + : SubscribeAttribute("average-rms-over-voltage-counter-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A06) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A12) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84730,12 +93085,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMinPhaseCWithParams:params + [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMinPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84744,29 +93099,30 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMinPhaseC : public Subscr }; /* - * Attribute RmsVoltageMaxPhaseC + * Attribute AverageRmsUnderVoltageCounterPhaseC */ -class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { +class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageMaxPhaseC() - : ReadAttribute("rms-voltage-max-phase-c") + ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() + : ReadAttribute("average-rms-under-voltage-counter-phase-c") { } - ~ReadElectricalMeasurementRmsVoltageMaxPhaseC() {} + ~ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A07) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A13) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsVoltageMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); + [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^( + NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageMaxPhaseC read Error", error); + LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84774,18 +93130,18 @@ class ReadElectricalMeasurementRmsVoltageMaxPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC() - : SubscribeAttribute("rms-voltage-max-phase-c") + SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() + : SubscribeAttribute("average-rms-under-voltage-counter-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC() {} + ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A07) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A13) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84800,12 +93156,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageMaxPhaseCWithParams:params + [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageMaxPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84814,48 +93170,49 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageMaxPhaseC : public Subscr }; /* - * Attribute RmsCurrentPhaseC + * Attribute RmsExtremeOverVoltagePeriodPhaseC */ -class ReadElectricalMeasurementRmsCurrentPhaseC : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentPhaseC() - : ReadAttribute("rms-current-phase-c") + ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() + : ReadAttribute("rms-extreme-over-voltage-period-phase-c") { } - ~ReadElectricalMeasurementRmsCurrentPhaseC() {} + ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A08) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A14) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC() - : SubscribeAttribute("rms-current-phase-c") + SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() + : SubscribeAttribute("rms-extreme-over-voltage-period-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC() {} + ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A08) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A14) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84870,12 +93227,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentPhaseCWithParams:params + [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84884,48 +93241,49 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentPhaseC : public Subscribe }; /* - * Attribute RmsCurrentMinPhaseC + * Attribute RmsExtremeUnderVoltagePeriodPhaseC */ -class ReadElectricalMeasurementRmsCurrentMinPhaseC : public ReadAttribute { +class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMinPhaseC() - : ReadAttribute("rms-current-min-phase-c") + ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() + : ReadAttribute("rms-extreme-under-voltage-period-phase-c") { } - ~ReadElectricalMeasurementRmsCurrentMinPhaseC() {} + ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A09) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A15) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentMinPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + [cluster + readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); + if (error != nil) { + LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseC read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC() - : SubscribeAttribute("rms-current-min-phase-c") + SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() + : SubscribeAttribute("rms-extreme-under-voltage-period-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC() {} + ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A09) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A15) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -84940,12 +93298,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMinPhaseCWithParams:params + [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMinPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -84954,29 +93312,29 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMinPhaseC : public Subscr }; /* - * Attribute RmsCurrentMaxPhaseC + * Attribute RmsVoltageSagPeriodPhaseC */ -class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementRmsCurrentMaxPhaseC() - : ReadAttribute("rms-current-max-phase-c") + ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC() + : ReadAttribute("rms-voltage-sag-period-phase-c") { } - ~ReadElectricalMeasurementRmsCurrentMaxPhaseC() {} + ~ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A16) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRmsCurrentMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); + [cluster readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsCurrentMaxPhaseC read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -84984,18 +93342,18 @@ class ReadElectricalMeasurementRmsCurrentMaxPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC() - : SubscribeAttribute("rms-current-max-phase-c") + SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC() + : SubscribeAttribute("rms-voltage-sag-period-phase-c") { } - ~SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0A) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A16) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85010,12 +93368,12 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsCurrentMaxPhaseCWithParams:params + [cluster subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsCurrentMaxPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85024,29 +93382,29 @@ class SubscribeAttributeElectricalMeasurementRmsCurrentMaxPhaseC : public Subscr }; /* - * Attribute ActivePowerPhaseC + * Attribute RmsVoltageSwellPeriodPhaseC */ -class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { +class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerPhaseC() - : ReadAttribute("active-power-phase-c") + ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC() + : ReadAttribute("rms-voltage-swell-period-phase-c") { } - ~ReadElectricalMeasurementActivePowerPhaseC() {} + ~ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A17) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); + [cluster readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerPhaseC read Error", error); + LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseC read Error", error); } SetCommandExitStatus(error); }]; @@ -85054,18 +93412,18 @@ class ReadElectricalMeasurementActivePowerPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerPhaseC() - : SubscribeAttribute("active-power-phase-c") + SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC() + : SubscribeAttribute("rms-voltage-swell-period-phase-c") { } - ~SubscribeAttributeElectricalMeasurementActivePowerPhaseC() {} + ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0B) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A17) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85080,12 +93438,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerPhaseCWithParams:params + [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85094,29 +93452,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerPhaseC : public Subscrib }; /* - * Attribute ActivePowerMinPhaseC + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { +class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMinPhaseC() - : ReadAttribute("active-power-min-phase-c") + ReadElectricalMeasurementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementActivePowerMinPhaseC() {} + ~ReadElectricalMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMinPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerMinPhaseC read Error", error); + LogNSError("ElectricalMeasurement GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85124,18 +93482,18 @@ class ReadElectricalMeasurementActivePowerMinPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC() - : SubscribeAttribute("active-power-min-phase-c") + SubscribeAttributeElectricalMeasurementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC() {} + ~SubscribeAttributeElectricalMeasurementGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0C) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85150,12 +93508,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMinPhaseCWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMinPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85164,29 +93522,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerMinPhaseC : public Subsc }; /* - * Attribute ActivePowerMaxPhaseC + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { +class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementActivePowerMaxPhaseC() - : ReadAttribute("active-power-max-phase-c") + ReadElectricalMeasurementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementActivePowerMaxPhaseC() {} + ~ReadElectricalMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActivePowerMaxPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ActivePowerMaxPhaseC read Error", error); + LogNSError("ElectricalMeasurement AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85194,18 +93552,18 @@ class ReadElectricalMeasurementActivePowerMaxPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC() - : SubscribeAttribute("active-power-max-phase-c") + SubscribeAttributeElectricalMeasurementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC() {} + ~SubscribeAttributeElectricalMeasurementAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0D) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85220,12 +93578,12 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActivePowerMaxPhaseCWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ActivePowerMaxPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85234,29 +93592,29 @@ class SubscribeAttributeElectricalMeasurementActivePowerMaxPhaseC : public Subsc }; /* - * Attribute ReactivePowerPhaseC + * Attribute EventList */ -class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { +class ReadElectricalMeasurementEventList : public ReadAttribute { public: - ReadElectricalMeasurementReactivePowerPhaseC() - : ReadAttribute("reactive-power-phase-c") + ReadElectricalMeasurementEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementReactivePowerPhaseC() {} + ~ReadElectricalMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReactivePowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ReactivePowerPhaseC read Error", error); + LogNSError("ElectricalMeasurement EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -85264,18 +93622,18 @@ class ReadElectricalMeasurementReactivePowerPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementReactivePowerPhaseC() - : SubscribeAttribute("reactive-power-phase-c") + SubscribeAttributeElectricalMeasurementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementReactivePowerPhaseC() {} + ~SubscribeAttributeElectricalMeasurementEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0E) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85290,12 +93648,12 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReactivePowerPhaseCWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ReactivePowerPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85304,29 +93662,29 @@ class SubscribeAttributeElectricalMeasurementReactivePowerPhaseC : public Subscr }; /* - * Attribute ApparentPowerPhaseC + * Attribute AttributeList */ -class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { +class ReadElectricalMeasurementAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementApparentPowerPhaseC() - : ReadAttribute("apparent-power-phase-c") + ReadElectricalMeasurementAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementApparentPowerPhaseC() {} + ~ReadElectricalMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A0F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeApparentPowerPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ApparentPowerPhaseC read Error", error); + LogNSError("ElectricalMeasurement AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -85334,18 +93692,18 @@ class ReadElectricalMeasurementApparentPowerPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementApparentPowerPhaseC() - : SubscribeAttribute("apparent-power-phase-c") + SubscribeAttributeElectricalMeasurementAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementApparentPowerPhaseC() {} + ~SubscribeAttributeElectricalMeasurementAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A0F) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85360,12 +93718,12 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeApparentPowerPhaseCWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ApparentPowerPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85374,29 +93732,29 @@ class SubscribeAttributeElectricalMeasurementApparentPowerPhaseC : public Subscr }; /* - * Attribute PowerFactorPhaseC + * Attribute FeatureMap */ -class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { +class ReadElectricalMeasurementFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementPowerFactorPhaseC() - : ReadAttribute("power-factor-phase-c") + ReadElectricalMeasurementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementPowerFactorPhaseC() {} + ~ReadElectricalMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A10) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerFactorPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement PowerFactorPhaseC read Error", error); + LogNSError("ElectricalMeasurement FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -85404,18 +93762,18 @@ class ReadElectricalMeasurementPowerFactorPhaseC : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementPowerFactorPhaseC() - : SubscribeAttribute("power-factor-phase-c") + SubscribeAttributeElectricalMeasurementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementPowerFactorPhaseC() {} + ~SubscribeAttributeElectricalMeasurementFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A10) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85430,12 +93788,12 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerFactorPhaseCWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.PowerFactorPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85444,30 +93802,29 @@ class SubscribeAttributeElectricalMeasurementPowerFactorPhaseC : public Subscrib }; /* - * Attribute AverageRmsVoltageMeasurementPeriodPhaseC + * Attribute ClusterRevision */ -class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public ReadAttribute { +class ReadElectricalMeasurementClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() - : ReadAttribute("average-rms-voltage-measurement-period-phase-c") + ReadElectricalMeasurementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() {} + ~ReadElectricalMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A11) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsVoltageMeasurementPeriodPhaseC read Error", error); + LogNSError("ElectricalMeasurement ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -85475,18 +93832,18 @@ class ReadElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public } }; -class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() - : SubscribeAttribute("average-rms-voltage-measurement-period-phase-c") + SubscribeAttributeElectricalMeasurementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodPhaseC() {} + ~SubscribeAttributeElectricalMeasurementClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A11) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device endpointID:@(endpointId) @@ -85501,12 +93858,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsVoltageMeasurementPeriodPhaseCWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsVoltageMeasurementPeriodPhaseC response %@", [value description]); + NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85514,102 +93871,192 @@ class SubscribeAttributeElectricalMeasurementAverageRmsVoltageMeasurementPeriodP } }; +/*----------------------------------------------------------------------------*\ +| Cluster ClientMonitoring | 0x1046 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RegisterClientMonitoring | 0x00 | +| * UnregisterClientMonitoring | 0x01 | +| * StayAwakeRequest | 0x02 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * IdleModeInterval | 0x0000 | +| * ActiveModeInterval | 0x0001 | +| * ActiveModeThreshold | 0x0002 | +| * ExpectedClients | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AverageRmsOverVoltageCounterPhaseC + * Command RegisterClientMonitoring */ -class ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public ReadAttribute { +class ClientMonitoringRegisterClientMonitoring : public ClusterCommand { public: - ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() - : ReadAttribute("average-rms-over-voltage-counter-phase-c") + ClientMonitoringRegisterClientMonitoring() + : ClusterCommand("register-client-monitoring") { + AddArgument("ClientNodeId", 0, UINT64_MAX, &mRequest.clientNodeId); + AddArgument("ICid", 0, UINT64_MAX, &mRequest.ICid); + ClusterCommand::AddArguments(); } - ~ReadElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A12) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeAverageRmsOverVoltageCounterPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsOverVoltageCounterPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRClientMonitoringClusterRegisterClientMonitoringParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.clientNodeId = [NSNumber numberWithUnsignedLongLong:mRequest.clientNodeId]; + params.iCid = [NSNumber numberWithUnsignedLongLong:mRequest.ICid]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster registerClientMonitoringWithParams:params + completion:^(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::ClientMonitoring::Commands::RegisterClientMonitoring::Type mRequest; }; -class SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC : public SubscribeAttribute { +/* + * Command UnregisterClientMonitoring + */ +class ClientMonitoringUnregisterClientMonitoring : public ClusterCommand { public: - SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() - : SubscribeAttribute("average-rms-over-voltage-counter-phase-c") + ClientMonitoringUnregisterClientMonitoring() + : ClusterCommand("unregister-client-monitoring") { + AddArgument("ClientNodeId", 0, UINT64_MAX, &mRequest.clientNodeId); + AddArgument("ICid", 0, UINT64_MAX, &mRequest.ICid); + ClusterCommand::AddArguments(); } - ~SubscribeAttributeElectricalMeasurementAverageRmsOverVoltageCounterPhaseC() {} - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A12) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000001) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRClientMonitoringClusterUnregisterClientMonitoringParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.clientNodeId = [NSNumber numberWithUnsignedLongLong:mRequest.clientNodeId]; + params.iCid = [NSNumber numberWithUnsignedLongLong:mRequest.ICid]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster unregisterClientMonitoringWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeAverageRmsOverVoltageCounterPhaseCWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsOverVoltageCounterPhaseC response %@", [value description]); - SetCommandExitStatus(error); - }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::ClientMonitoring::Commands::UnregisterClientMonitoring::Type mRequest; +}; + +/* + * Command StayAwakeRequest + */ +class ClientMonitoringStayAwakeRequest : public ClusterCommand { +public: + ClientMonitoringStayAwakeRequest() + : ClusterCommand("stay-awake-request") + { + ClusterCommand::AddArguments(); + } + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x00001046) command (0x00000002) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRClientMonitoringClusterStayAwakeRequestParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster stayAwakeRequestWithParams:params + completion:^(NSError * _Nullable error) { + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; /* - * Attribute AverageRmsUnderVoltageCounterPhaseC + * Attribute IdleModeInterval */ -class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public ReadAttribute { +class ReadClientMonitoringIdleModeInterval : public ReadAttribute { public: - ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() - : ReadAttribute("average-rms-under-voltage-counter-phase-c") + ReadClientMonitoringIdleModeInterval() + : ReadAttribute("idle-mode-interval") { } - ~ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() {} + ~ReadClientMonitoringIdleModeInterval() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A13) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAverageRmsUnderVoltageCounterPhaseCWithCompletion:^( - NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeIdleModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.IdleModeInterval response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AverageRmsUnderVoltageCounterPhaseC read Error", error); + LogNSError("ClientMonitoring IdleModeInterval read Error", error); } SetCommandExitStatus(error); }]; @@ -85617,22 +94064,22 @@ class ReadElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public Read } }; -class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringIdleModeInterval : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() - : SubscribeAttribute("average-rms-under-voltage-counter-phase-c") + SubscribeAttributeClientMonitoringIdleModeInterval() + : SubscribeAttribute("idle-mode-interval") { } - ~SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC() {} + ~SubscribeAttributeClientMonitoringIdleModeInterval() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A13) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x00000000) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85643,12 +94090,12 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAverageRmsUnderVoltageCounterPhaseCWithParams:params + [cluster subscribeAttributeIdleModeIntervalWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AverageRmsUnderVoltageCounterPhaseC response %@", [value description]); + NSLog(@"ClientMonitoring.IdleModeInterval response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85657,53 +94104,52 @@ class SubscribeAttributeElectricalMeasurementAverageRmsUnderVoltageCounterPhaseC }; /* - * Attribute RmsExtremeOverVoltagePeriodPhaseC + * Attribute ActiveModeInterval */ -class ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public ReadAttribute { +class ReadClientMonitoringActiveModeInterval : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() - : ReadAttribute("rms-extreme-over-voltage-period-phase-c") + ReadClientMonitoringActiveModeInterval() + : ReadAttribute("active-mode-interval") { } - ~ReadElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() {} + ~ReadClientMonitoringActiveModeInterval() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A14) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeRmsExtremeOverVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeOverVoltagePeriodPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeActiveModeIntervalWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.ActiveModeInterval response %@", [value description]); + if (error != nil) { + LogNSError("ClientMonitoring ActiveModeInterval read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringActiveModeInterval : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() - : SubscribeAttribute("rms-extreme-over-voltage-period-phase-c") + SubscribeAttributeClientMonitoringActiveModeInterval() + : SubscribeAttribute("active-mode-interval") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC() {} + ~SubscribeAttributeClientMonitoringActiveModeInterval() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A14) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x00000001) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85714,12 +94160,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeOverVoltagePeriodPhaseCWithParams:params + [cluster subscribeAttributeActiveModeIntervalWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeOverVoltagePeriodPhaseC response %@", [value description]); + NSLog(@"ClientMonitoring.ActiveModeInterval response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85728,53 +94174,52 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeOverVoltagePeriodPhaseC : }; /* - * Attribute RmsExtremeUnderVoltagePeriodPhaseC + * Attribute ActiveModeThreshold */ -class ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public ReadAttribute { +class ReadClientMonitoringActiveModeThreshold : public ReadAttribute { public: - ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() - : ReadAttribute("rms-extreme-under-voltage-period-phase-c") + ReadClientMonitoringActiveModeThreshold() + : ReadAttribute("active-mode-threshold") { } - ~ReadElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() {} + ~ReadClientMonitoringActiveModeThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A15) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster - readAttributeRmsExtremeUnderVoltagePeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsExtremeUnderVoltagePeriodPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.ActiveModeThreshold response %@", [value description]); + if (error != nil) { + LogNSError("ClientMonitoring ActiveModeThreshold read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringActiveModeThreshold : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() - : SubscribeAttribute("rms-extreme-under-voltage-period-phase-c") + SubscribeAttributeClientMonitoringActiveModeThreshold() + : SubscribeAttribute("active-mode-threshold") { } - ~SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC() {} + ~SubscribeAttributeClientMonitoringActiveModeThreshold() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A15) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x00000002) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85785,12 +94230,12 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsExtremeUnderVoltagePeriodPhaseCWithParams:params + [cluster subscribeAttributeActiveModeThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsExtremeUnderVoltagePeriodPhaseC response %@", [value description]); + NSLog(@"ClientMonitoring.ActiveModeThreshold response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85799,52 +94244,57 @@ class SubscribeAttributeElectricalMeasurementRmsExtremeUnderVoltagePeriodPhaseC }; /* - * Attribute RmsVoltageSagPeriodPhaseC + * Attribute ExpectedClients */ -class ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC : public ReadAttribute { +class ReadClientMonitoringExpectedClients : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC() - : ReadAttribute("rms-voltage-sag-period-phase-c") + ReadClientMonitoringExpectedClients() + : ReadAttribute("expected-clients") { } - ~ReadElectricalMeasurementRmsVoltageSagPeriodPhaseC() {} + ~ReadClientMonitoringExpectedClients() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A16) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageSagPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); - if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSagPeriodPhaseC read Error", error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeExpectedClientsWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.ExpectedClients response %@", [value description]); + if (error != nil) { + LogNSError("ClientMonitoring ExpectedClients read Error", error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringExpectedClients : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC() - : SubscribeAttribute("rms-voltage-sag-period-phase-c") + SubscribeAttributeClientMonitoringExpectedClients() + : SubscribeAttribute("expected-clients") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC() {} + ~SubscribeAttributeClientMonitoringExpectedClients() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A16) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x00000003) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85855,12 +94305,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSagPeriodPhaseCWithParams:params + [cluster subscribeAttributeExpectedClientsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSagPeriodPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.ExpectedClients response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85869,29 +94319,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSagPeriodPhaseC : public }; /* - * Attribute RmsVoltageSwellPeriodPhaseC + * Attribute GeneratedCommandList */ -class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribute { +class ReadClientMonitoringGeneratedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC() - : ReadAttribute("rms-voltage-swell-period-phase-c") + ReadClientMonitoringGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC() {} + ~ReadClientMonitoringGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x00000A17) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeRmsVoltageSwellPeriodPhaseCWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.GeneratedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement RmsVoltageSwellPeriodPhaseC read Error", error); + LogNSError("ClientMonitoring GeneratedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85899,22 +94349,22 @@ class ReadElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public ReadAttribut } }; -class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC() - : SubscribeAttribute("rms-voltage-swell-period-phase-c") + SubscribeAttributeClientMonitoringGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC() {} + ~SubscribeAttributeClientMonitoringGeneratedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x00000A17) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85925,12 +94375,12 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRmsVoltageSwellPeriodPhaseCWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.RmsVoltageSwellPeriodPhaseC response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.GeneratedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -85939,29 +94389,29 @@ class SubscribeAttributeElectricalMeasurementRmsVoltageSwellPeriodPhaseC : publi }; /* - * Attribute GeneratedCommandList + * Attribute AcceptedCommandList */ -class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { +class ReadClientMonitoringAcceptedCommandList : public ReadAttribute { public: - ReadElectricalMeasurementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadClientMonitoringAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadElectricalMeasurementGeneratedCommandList() {} + ~ReadClientMonitoringAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.AcceptedCommandList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement GeneratedCommandList read Error", error); + LogNSError("ClientMonitoring AcceptedCommandList read Error", error); } SetCommandExitStatus(error); }]; @@ -85969,22 +94419,22 @@ class ReadElectricalMeasurementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeClientMonitoringAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeElectricalMeasurementGeneratedCommandList() {} + ~SubscribeAttributeClientMonitoringAcceptedCommandList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -85995,12 +94445,12 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.GeneratedCommandList response %@", [value description]); + NSLog(@"ClientMonitoring.AcceptedCommandList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86009,29 +94459,29 @@ class SubscribeAttributeElectricalMeasurementGeneratedCommandList : public Subsc }; /* - * Attribute AcceptedCommandList + * Attribute EventList */ -class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { +class ReadClientMonitoringEventList : public ReadAttribute { public: - ReadElectricalMeasurementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadClientMonitoringEventList() + : ReadAttribute("event-list") { } - ~ReadElectricalMeasurementAcceptedCommandList() {} + ~ReadClientMonitoringEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ClientMonitoring.EventList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AcceptedCommandList read Error", error); + LogNSError("ClientMonitoring EventList read Error", error); } SetCommandExitStatus(error); }]; @@ -86039,22 +94489,22 @@ class ReadElectricalMeasurementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringEventList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeClientMonitoringEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeElectricalMeasurementAcceptedCommandList() {} + ~SubscribeAttributeClientMonitoringEventList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86065,12 +94515,12 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AcceptedCommandList response %@", [value description]); + NSLog(@"ClientMonitoring.EventList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86081,27 +94531,27 @@ class SubscribeAttributeElectricalMeasurementAcceptedCommandList : public Subscr /* * Attribute AttributeList */ -class ReadElectricalMeasurementAttributeList : public ReadAttribute { +class ReadClientMonitoringAttributeList : public ReadAttribute { public: - ReadElectricalMeasurementAttributeList() + ReadClientMonitoringAttributeList() : ReadAttribute("attribute-list") { } - ~ReadElectricalMeasurementAttributeList() {} + ~ReadClientMonitoringAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); + NSLog(@"ClientMonitoring.AttributeList response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement AttributeList read Error", error); + LogNSError("ClientMonitoring AttributeList read Error", error); } SetCommandExitStatus(error); }]; @@ -86109,22 +94559,22 @@ class ReadElectricalMeasurementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringAttributeList : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementAttributeList() + SubscribeAttributeClientMonitoringAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeElectricalMeasurementAttributeList() {} + ~SubscribeAttributeClientMonitoringAttributeList() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86140,7 +94590,7 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.AttributeList response %@", [value description]); + NSLog(@"ClientMonitoring.AttributeList response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86151,27 +94601,27 @@ class SubscribeAttributeElectricalMeasurementAttributeList : public SubscribeAtt /* * Attribute FeatureMap */ -class ReadElectricalMeasurementFeatureMap : public ReadAttribute { +class ReadClientMonitoringFeatureMap : public ReadAttribute { public: - ReadElectricalMeasurementFeatureMap() + ReadClientMonitoringFeatureMap() : ReadAttribute("feature-map") { } - ~ReadElectricalMeasurementFeatureMap() {} + ~ReadClientMonitoringFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ClientMonitoring.FeatureMap response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement FeatureMap read Error", error); + LogNSError("ClientMonitoring FeatureMap read Error", error); } SetCommandExitStatus(error); }]; @@ -86179,22 +94629,22 @@ class ReadElectricalMeasurementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementFeatureMap() + SubscribeAttributeClientMonitoringFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeElectricalMeasurementFeatureMap() {} + ~SubscribeAttributeClientMonitoringFeatureMap() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86210,7 +94660,7 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.FeatureMap response %@", [value description]); + NSLog(@"ClientMonitoring.FeatureMap response %@", [value description]); SetCommandExitStatus(error); }]; @@ -86221,27 +94671,27 @@ class SubscribeAttributeElectricalMeasurementFeatureMap : public SubscribeAttrib /* * Attribute ClusterRevision */ -class ReadElectricalMeasurementClusterRevision : public ReadAttribute { +class ReadClientMonitoringClusterRevision : public ReadAttribute { public: - ReadElectricalMeasurementClusterRevision() + ReadClientMonitoringClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadElectricalMeasurementClusterRevision() {} + ~ReadClientMonitoringClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ClientMonitoring.ClusterRevision response %@", [value description]); if (error != nil) { - LogNSError("ElectricalMeasurement ClusterRevision read Error", error); + LogNSError("ClientMonitoring ClusterRevision read Error", error); } SetCommandExitStatus(error); }]; @@ -86249,22 +94699,22 @@ class ReadElectricalMeasurementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeClientMonitoringClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeElectricalMeasurementClusterRevision() + SubscribeAttributeClientMonitoringClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeElectricalMeasurementClusterRevision() {} + ~SubscribeAttributeClientMonitoringClusterRevision() {} CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - ChipLogProgress(chipTool, "Sending cluster (0x00000B04) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + ChipLogProgress(chipTool, "Sending cluster (0x00001046) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterElectricalMeasurement alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterClientMonitoring alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -86280,7 +94730,7 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ElectricalMeasurement.ClusterRevision response %@", [value description]); + NSLog(@"ClientMonitoring.ClusterRevision response %@", [value description]); SetCommandExitStatus(error); }]; @@ -97458,6 +105908,76 @@ class SubscribeAttributeUnitTestingAcceptedCommandList : public SubscribeAttribu } }; +/* + * Attribute EventList + */ +class ReadUnitTestingEventList : public ReadAttribute { +public: + ReadUnitTestingEventList() + : ReadAttribute("event-list") + { + } + + ~ReadUnitTestingEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.EventList response %@", [value description]); + if (error != nil) { + LogNSError("UnitTesting EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeUnitTestingEventList : public SubscribeAttribute { +public: + SubscribeAttributeUnitTestingEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeUnitTestingEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC05) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /* * Attribute AttributeList */ @@ -97668,6 +106188,548 @@ class SubscribeAttributeUnitTestingClusterRevision : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster FaultInjection | 0xFFF1FC06| +|------------------------------------------------------------------------------| +| Commands: | | +| * FailAtFault | 0x00 | +| * FailRandomlyAtFault | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command FailAtFault + */ +class FaultInjectionFailAtFault : public ClusterCommand { +public: + FaultInjectionFailAtFault() + : ClusterCommand("fail-at-fault") + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("NumCallsToSkip", 0, UINT32_MAX, &mRequest.numCallsToSkip); + AddArgument("NumCallsToFail", 0, UINT32_MAX, &mRequest.numCallsToFail); + AddArgument("TakeMutex", 0, 1, &mRequest.takeMutex); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000000) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRFaultInjectionClusterFailAtFaultParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.type)]; + params.id = [NSNumber numberWithUnsignedInt:mRequest.id]; + params.numCallsToSkip = [NSNumber numberWithUnsignedInt:mRequest.numCallsToSkip]; + params.numCallsToFail = [NSNumber numberWithUnsignedInt:mRequest.numCallsToFail]; + params.takeMutex = [NSNumber numberWithBool:mRequest.takeMutex]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster failAtFaultWithParams:params + completion:^(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::FaultInjection::Commands::FailAtFault::Type mRequest; +}; + +/* + * Command FailRandomlyAtFault + */ +class FaultInjectionFailRandomlyAtFault : public ClusterCommand { +public: + FaultInjectionFailRandomlyAtFault() + : ClusterCommand("fail-randomly-at-fault") + { + AddArgument("Type", 0, UINT8_MAX, &mRequest.type); + AddArgument("Id", 0, UINT32_MAX, &mRequest.id); + AddArgument("Percentage", 0, UINT8_MAX, &mRequest.percentage); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) command (0x00000001) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRFaultInjectionClusterFailRandomlyAtFaultParams alloc] init]; + params.timedInvokeTimeoutMs + = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.type = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.type)]; + params.id = [NSNumber numberWithUnsignedInt:mRequest.id]; + params.percentage = [NSNumber numberWithUnsignedChar:mRequest.percentage]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster failRandomlyAtFaultWithParams:params + completion:^(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::FaultInjection::Commands::FailRandomlyAtFault::Type mRequest; +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadFaultInjectionGeneratedCommandList : public ReadAttribute { +public: + ReadFaultInjectionGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadFaultInjectionGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.GeneratedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection GeneratedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeFaultInjectionGeneratedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeGeneratedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.GeneratedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AcceptedCommandList + */ +class ReadFaultInjectionAcceptedCommandList : public ReadAttribute { +public: + ReadFaultInjectionAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadFaultInjectionAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AcceptedCommandList response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection AcceptedCommandList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeFaultInjectionAcceptedCommandList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AcceptedCommandList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute EventList + */ +class ReadFaultInjectionEventList : public ReadAttribute { +public: + ReadFaultInjectionEventList() + : ReadAttribute("event-list") + { + } + + ~ReadFaultInjectionEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.EventList response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection EventList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionEventList : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeFaultInjectionEventList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeEventListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.EventList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute AttributeList + */ +class ReadFaultInjectionAttributeList : public ReadAttribute { +public: + ReadFaultInjectionAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadFaultInjectionAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AttributeList response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection AttributeList read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeFaultInjectionAttributeList() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.AttributeList response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute FeatureMap + */ +class ReadFaultInjectionFeatureMap : public ReadAttribute { +public: + ReadFaultInjectionFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadFaultInjectionFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.FeatureMap response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection FeatureMap read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeFaultInjectionFeatureMap() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFeatureMapWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.FeatureMap response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute ClusterRevision + */ +class ReadFaultInjectionClusterRevision : public ReadAttribute { +public: + ReadFaultInjectionClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadFaultInjectionClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.ClusterRevision response %@", [value description]); + if (error != nil) { + LogNSError("FaultInjection ClusterRevision read Error", error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeFaultInjectionClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeFaultInjectionClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeFaultInjectionClusterRevision() {} + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0xFFF1FC06) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterFaultInjection alloc] initWithDevice:device + endpointID:@(endpointId) + queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { + mSubscriptionEstablished = YES; + } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"FaultInjection.ClusterRevision response %@", [value description]); + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + /*----------------------------------------------------------------------------*\ | Register all Clusters commands | \*----------------------------------------------------------------------------*/ @@ -97693,6 +106755,8 @@ void registerClusterIdentify(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -97726,6 +106790,8 @@ void registerClusterGroups(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -97773,6 +106839,8 @@ void registerClusterScenes(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -97817,6 +106885,8 @@ void registerClusterOnOff(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -97847,6 +106917,8 @@ void registerClusterOnOffSwitchConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -97916,6 +106988,8 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -97965,6 +107039,8 @@ void registerClusterBinaryInputBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -97975,6 +107051,33 @@ void registerClusterBinaryInputBasic(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterPulseWidthModulation(Commands & commands) +{ + using namespace chip::app::Clusters::PulseWidthModulation; + + const char * clusterName = "PulseWidthModulation"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterDescriptor(Commands & commands) { using namespace chip::app::Clusters::Descriptor; @@ -97998,6 +107101,8 @@ void registerClusterDescriptor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98026,6 +107131,8 @@ void registerClusterBinding(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98063,6 +107170,8 @@ void registerClusterAccessControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98108,6 +107217,8 @@ void registerClusterActions(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98180,6 +107291,8 @@ void registerClusterBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98210,6 +107323,8 @@ void registerClusterOtaSoftwareUpdateProvider(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98245,6 +107360,8 @@ void registerClusterOtaSoftwareUpdateRequestor(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98277,6 +107394,8 @@ void registerClusterLocalizationConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98310,6 +107429,8 @@ void registerClusterTimeFormatLocalization(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98338,6 +107459,8 @@ void registerClusterUnitLocalization(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98365,6 +107488,8 @@ void registerClusterPowerSourceConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98452,6 +107577,8 @@ void registerClusterPowerSource(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98493,6 +107620,8 @@ void registerClusterGeneralCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98541,6 +107670,8 @@ void registerClusterNetworkCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98567,6 +107698,8 @@ void registerClusterDiagnosticLogs(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98611,6 +107744,8 @@ void registerClusterGeneralDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98647,6 +107782,8 @@ void registerClusterSoftwareDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98801,6 +107938,8 @@ void registerClusterThreadNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98855,6 +107994,8 @@ void registerClusterWiFiNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98901,6 +108042,8 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98911,6 +108054,58 @@ void registerClusterEthernetNetworkDiagnostics(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterTimeSynchronization(Commands & commands) +{ + using namespace chip::app::Clusters::TimeSynchronization; + + const char * clusterName = "TimeSynchronization"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterBridgedDeviceBasicInformation(Commands & commands) { using namespace chip::app::Clusters::BridgedDeviceBasicInformation; @@ -98959,6 +108154,8 @@ void registerClusterBridgedDeviceBasicInformation(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -98992,6 +108189,8 @@ void registerClusterSwitch(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99028,6 +108227,8 @@ void registerClusterAdministratorCommissioning(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99073,6 +108274,8 @@ void registerClusterOperationalCredentials(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99111,6 +108314,8 @@ void registerClusterGroupKeyManagement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99138,6 +108343,8 @@ void registerClusterFixedLabel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99166,6 +108373,8 @@ void registerClusterUserLabel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99176,6 +108385,87 @@ void registerClusterUserLabel(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterProxyConfiguration(Commands & commands) +{ + using namespace chip::app::Clusters::ProxyConfiguration; + + const char * clusterName = "ProxyConfiguration"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterProxyDiscovery(Commands & commands) +{ + using namespace chip::app::Clusters::ProxyDiscovery; + + const char * clusterName = "ProxyDiscovery"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} +void registerClusterProxyValid(Commands & commands) +{ + using namespace chip::app::Clusters::ProxyValid; + + const char * clusterName = "ProxyValid"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterBooleanState(Commands & commands) { using namespace chip::app::Clusters::BooleanState; @@ -99193,6 +108483,8 @@ void registerClusterBooleanState(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99235,6 +108527,8 @@ void registerClusterModeSelect(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99368,6 +108662,8 @@ void registerClusterDoorLock(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99447,6 +108743,8 @@ void registerClusterWindowCovering(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99500,6 +108798,8 @@ void registerClusterBarrierControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99575,6 +108875,8 @@ void registerClusterPumpConfigurationAndControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99731,6 +109033,8 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99784,6 +109088,8 @@ void registerClusterFanControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99818,6 +109124,8 @@ void registerClusterThermostatUserInterfaceConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -99979,6 +109287,8 @@ void registerClusterColorControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100042,6 +109352,8 @@ void registerClusterBallastConfiguration(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100077,6 +109389,8 @@ void registerClusterIlluminanceMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100110,6 +109424,8 @@ void registerClusterTemperatureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100153,6 +109469,8 @@ void registerClusterPressureMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100186,6 +109504,8 @@ void registerClusterFlowMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100219,6 +109539,8 @@ void registerClusterRelativeHumidityMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100277,6 +109599,8 @@ void registerClusterOccupancySensing(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100304,6 +109628,8 @@ void registerClusterWakeOnLan(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100338,6 +109664,8 @@ void registerClusterChannel(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100368,6 +109696,8 @@ void registerClusterTargetNavigator(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100418,6 +109748,8 @@ void registerClusterMediaPlayback(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100451,6 +109783,8 @@ void registerClusterMediaInput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100477,6 +109811,8 @@ void registerClusterLowPower(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100503,6 +109839,8 @@ void registerClusterKeypadInput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100535,6 +109873,8 @@ void registerClusterContentLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100566,6 +109906,8 @@ void registerClusterAudioOutput(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100599,6 +109941,8 @@ void registerClusterApplicationLauncher(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100640,6 +109984,8 @@ void registerClusterApplicationBasic(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100668,6 +110014,8 @@ void registerClusterAccountLogin(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100959,6 +110307,8 @@ void registerClusterElectricalMeasurement(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -100969,6 +110319,44 @@ void registerClusterElectricalMeasurement(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterClientMonitoring(Commands & commands) +{ + using namespace chip::app::Clusters::ClientMonitoring; + + const char * clusterName = "ClientMonitoring"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterUnitTesting(Commands & commands) { using namespace chip::app::Clusters::UnitTesting; @@ -101252,6 +110640,8 @@ void registerClusterUnitTesting(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // + make_unique(), // make_unique(), // make_unique(), // make_unique(), // @@ -101264,6 +110654,35 @@ void registerClusterUnitTesting(Commands & commands) commands.Register(clusterName, clusterCommands); } +void registerClusterFaultInjection(Commands & commands) +{ + using namespace chip::app::Clusters::FaultInjection; + + const char * clusterName = "FaultInjection"; + + commands_list clusterCommands = { + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(Id), // + make_unique(), // + make_unique(Id), // + make_unique(Id), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + make_unique(), // + }; + + commands.Register(clusterName, clusterCommands); +} void registerClusterAny(Commands & commands) { @@ -101292,6 +110711,7 @@ void registerClusters(Commands & commands) registerClusterOnOffSwitchConfiguration(commands); registerClusterLevelControl(commands); registerClusterBinaryInputBasic(commands); + registerClusterPulseWidthModulation(commands); registerClusterDescriptor(commands); registerClusterBinding(commands); registerClusterAccessControl(commands); @@ -101312,6 +110732,7 @@ void registerClusters(Commands & commands) registerClusterThreadNetworkDiagnostics(commands); registerClusterWiFiNetworkDiagnostics(commands); registerClusterEthernetNetworkDiagnostics(commands); + registerClusterTimeSynchronization(commands); registerClusterBridgedDeviceBasicInformation(commands); registerClusterSwitch(commands); registerClusterAdministratorCommissioning(commands); @@ -101319,6 +110740,9 @@ void registerClusters(Commands & commands) registerClusterGroupKeyManagement(commands); registerClusterFixedLabel(commands); registerClusterUserLabel(commands); + registerClusterProxyConfiguration(commands); + registerClusterProxyDiscovery(commands); + registerClusterProxyValid(commands); registerClusterBooleanState(commands); registerClusterModeSelect(commands); registerClusterDoorLock(commands); @@ -101349,5 +110773,7 @@ void registerClusters(Commands & commands) registerClusterApplicationBasic(commands); registerClusterAccountLogin(commands); registerClusterElectricalMeasurement(commands); + registerClusterClientMonitoring(commands); registerClusterUnitTesting(commands); + registerClusterFaultInjection(commands); }