From 5940689538ee43e7f07ccdc5c6b2fbdf8facad8f Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 1 Nov 2023 09:53:00 -0400 Subject: [PATCH] Remove AverageWearCount attribute from SDK (#30125) * Remove AverageWearCount * Regenerated ZAP * Restyled by whitespace * Restyled by prettier-json * Added a comment to attribute access interface re: removal --------- Co-authored-by: Restyled.io --- .../general-diagnostics-server.cpp | 4 +- .../chip/general-diagnostics-cluster.xml | 11 ++- .../zcl/zcl-with-test-extensions.json | 3 +- src/app/zap-templates/zcl/zcl.json | 3 +- .../data_model/controller-clusters.matter | 1 - .../chip/devicecontroller/ChipClusters.java | 14 --- .../devicecontroller/ClusterIDMapping.java | 1 - .../devicecontroller/ClusterReadMapping.java | 11 --- .../CHIPAttributeTLVValueDecoder.cpp | 16 ---- .../python/chip/clusters/CHIPClusters.py | 6 -- .../python/chip/clusters/Objects.py | 18 ---- .../MTRAttributeSpecifiedCheck.mm | 3 - .../MTRAttributeTLVValueDecoder.mm | 13 --- .../CHIP/zap-generated/MTRBaseClusters.h | 6 -- .../CHIP/zap-generated/MTRBaseClusters.mm | 36 -------- .../CHIP/zap-generated/MTRClusterConstants.h | 1 - .../CHIP/zap-generated/MTRClusters.h | 2 - .../CHIP/zap-generated/MTRClusters.mm | 5 - .../zap-generated/cluster-objects.cpp | 2 - .../zap-generated/cluster-objects.h | 13 --- .../app-common/zap-generated/ids/Attributes.h | 4 - .../zap-generated/cluster/Commands.h | 5 - .../cluster/logging/DataModelLogger.cpp | 5 - .../zap-generated/cluster/Commands.h | 91 ------------------- 24 files changed, 12 insertions(+), 262 deletions(-) diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index 0ea54f2e2c96b6..108cc0b7d7357f 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -204,9 +204,7 @@ CHIP_ERROR GeneralDiagosticsAttrAccess::Read(const ConcreteReadAttributePath & a bool isTestEventTriggersEnabled = IsTestEventTriggerEnabled(); return aEncoder.Encode(isTestEventTriggersEnabled); } - case AverageWearCount::Id: { - return ReadIfSupported(&DiagnosticDataProvider::GetAverageWearCount, aEncoder); - } + // Note: Attribute ID 0x0009 was removed (#30002). default: { break; } diff --git a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml index 0a3c0f12ffd783..7bc52936563263 100644 --- a/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/general-diagnostics-cluster.xml @@ -93,8 +93,15 @@ limitations under the License. ActiveRadioFaults ActiveNetworkFaults TestEventTriggersEnabled - - AverageWearCount + Provide a means for certification tests to trigger some test-plan-specific events diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index 1c2b767a7c5fd4..c40474acd0341a 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -188,8 +188,7 @@ "RebootCount", "UpTime", "TotalOperationalHours", - "BootReason", - "AverageWearCount" + "BootReason" ], "Group Key Management": [ "ClusterRevision", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index db14ae2f939221..543978320a6792 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -186,8 +186,7 @@ "RebootCount", "UpTime", "TotalOperationalHours", - "BootReason", - "AverageWearCount" + "BootReason" ], "Group Key Management": [ "ClusterRevision", diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index c3bf2abceecb81..85c2c7fea6f2b2 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -1786,7 +1786,6 @@ client cluster GeneralDiagnostics = 51 { readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; readonly attribute boolean testEventTriggersEnabled = 8; - readonly attribute optional int32u averageWearCount = 9; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index de3db351f4b74a..38627e6e36a5b8 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -6217,16 +6217,6 @@ public void subscribeTestEventTriggersEnabledAttribute( subscribeTestEventTriggersEnabledAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readAverageWearCountAttribute( - LongAttributeCallback callback) { - readAverageWearCountAttribute(chipClusterPtr, callback); - } - - public void subscribeAverageWearCountAttribute( - LongAttributeCallback callback, int minInterval, int maxInterval) { - subscribeAverageWearCountAttribute(chipClusterPtr, callback, minInterval, maxInterval); - } - public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { readGeneratedCommandListAttribute(chipClusterPtr, callback); @@ -6323,10 +6313,6 @@ public void subscribeClusterRevisionAttribute( private native void subscribeTestEventTriggersEnabledAttribute(long chipClusterPtr, BooleanAttributeCallback callback, int minInterval, int maxInterval); - private native void readAverageWearCountAttribute(long chipClusterPtr, LongAttributeCallback callback); - - private native void subscribeAverageWearCountAttribute(long chipClusterPtr, LongAttributeCallback callback, int minInterval, int maxInterval); - private native void readGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback); private native void subscribeGeneratedCommandListAttribute(long chipClusterPtr, GeneratedCommandListAttributeCallback callback, int minInterval, int maxInterval); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 792350d7595992..9aa8a986a4acb5 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -3752,7 +3752,6 @@ public enum Attribute { ActiveRadioFaults(6L), ActiveNetworkFaults(7L), TestEventTriggersEnabled(8L), - AverageWearCount(9L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index a8c56baddaa892..4d67a09bc44389 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -3187,17 +3187,6 @@ private static Map readGeneralDiagnosticsInteractionInf readGeneralDiagnosticsTestEventTriggersEnabledCommandParams ); result.put("readTestEventTriggersEnabledAttribute", readGeneralDiagnosticsTestEventTriggersEnabledAttributeInteractionInfo); - Map readGeneralDiagnosticsAverageWearCountCommandParams = new LinkedHashMap(); - InteractionInfo readGeneralDiagnosticsAverageWearCountAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.GeneralDiagnosticsCluster) cluster).readAverageWearCountAttribute( - (ChipClusters.LongAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), - readGeneralDiagnosticsAverageWearCountCommandParams - ); - result.put("readAverageWearCountAttribute", readGeneralDiagnosticsAverageWearCountAttributeInteractionInfo); Map readGeneralDiagnosticsGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readGeneralDiagnosticsGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index b78186b015e332..f598aed22016bb 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -6584,22 +6584,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } - case Attributes::AverageWearCount::Id: { - using TypeInfo = Attributes::AverageWearCount::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - return value; - } case Attributes::GeneratedCommandList::Id: { using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 695f39d29c8f9f..ed5d8731e45b4b 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2459,12 +2459,6 @@ class ChipClusters: "type": "bool", "reportable": True, }, - 0x00000009: { - "attributeName": "AverageWearCount", - "attributeId": 0x00000009, - "type": "int", - "reportable": True, - }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 96a4531349c1fd..8949a2979ec4c8 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -8208,7 +8208,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="activeRadioFaults", Tag=0x00000006, Type=typing.Optional[typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]]), ClusterObjectFieldDescriptor(Label="activeNetworkFaults", Tag=0x00000007, Type=typing.Optional[typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]]), ClusterObjectFieldDescriptor(Label="testEventTriggersEnabled", Tag=0x00000008, Type=bool), - ClusterObjectFieldDescriptor(Label="averageWearCount", Tag=0x00000009, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -8226,7 +8225,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: activeRadioFaults: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.RadioFaultEnum]]' = None activeNetworkFaults: 'typing.Optional[typing.List[GeneralDiagnostics.Enums.NetworkFaultEnum]]' = None testEventTriggersEnabled: 'bool' = None - averageWearCount: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -8525,22 +8523,6 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'bool' = False - @dataclass - class AverageWearCount(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000033 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000009 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) - - value: 'typing.Optional[uint]' = None - @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index d9682c0187ce3b..50efa2e921d7cc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1080,9 +1080,6 @@ static BOOL AttributeIsSpecifiedInGeneralDiagnosticsCluster(AttributeId aAttribu case Attributes::TestEventTriggersEnabled::Id: { return YES; } - case Attributes::AverageWearCount::Id: { - return YES; - } case Attributes::GeneratedCommandList::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 80e2bed641acef..d4590fd3f870db 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -2806,19 +2806,6 @@ static id _Nullable DecodeAttributeValueForGeneralDiagnosticsCluster(AttributeId value = [NSNumber numberWithBool:cppValue]; return value; } -#if MTR_ENABLE_PROVISIONAL - case Attributes::AverageWearCount::Id: { - using TypeInfo = Attributes::AverageWearCount::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; - } -#endif // MTR_ENABLE_PROVISIONAL default: { break; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index a0fd13a593ceb1..6812d80bdf512a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -2682,12 +2682,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); -- (void)readAttributeAverageWearCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeAverageWearCountWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeAverageWearCountWithClusterStateCache:(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_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 93d0b800f9095f..401e15685d3539 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -22410,42 +22410,6 @@ + (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeAverageWearCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::AverageWearCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeAverageWearCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralDiagnostics::Attributes::AverageWearCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeAverageWearCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::AverageWearCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index a14a13f4496c75..c2646a29a5b0f6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -1361,7 +1361,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveRadioFaultsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000006, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeActiveNetworkFaultsID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000007, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000008, - MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAverageWearCountID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 8205ce87ed4078..b935997f344016 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -1345,8 +1345,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (NSDictionary * _Nullable)readAttributeTestEventTriggersEnabledWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -- (NSDictionary * _Nullable)readAttributeAverageWearCountWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 923c64b5e8eb22..2bfb26e75d41d4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -4516,11 +4516,6 @@ - (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeTestEventTriggersEnabledID) params:params]; } -- (NSDictionary * _Nullable)readAttributeAverageWearCountWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeAverageWearCountID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeGeneralDiagnosticsID) attributeID:@(MTRAttributeIDTypeClusterGeneralDiagnosticsAttributeGeneratedCommandListID) params:params]; diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index 1e1b2bd29c8733..365b2a958ddaa0 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -6541,8 +6541,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, activeNetworkFaults); case Attributes::TestEventTriggersEnabled::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, testEventTriggersEnabled); - case Attributes::AverageWearCount::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, averageWearCount); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index f0a0b1aaab6b69..25533ba62c05ac 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -8403,18 +8403,6 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace TestEventTriggersEnabled -namespace AverageWearCount { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; - - static constexpr ClusterId GetClusterId() { return Clusters::GeneralDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AverageWearCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AverageWearCount namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -8470,7 +8458,6 @@ struct TypeInfo Attributes::ActiveRadioFaults::TypeInfo::DecodableType activeRadioFaults; Attributes::ActiveNetworkFaults::TypeInfo::DecodableType activeNetworkFaults; Attributes::TestEventTriggersEnabled::TypeInfo::DecodableType testEventTriggersEnabled = static_cast(0); - Attributes::AverageWearCount::TypeInfo::DecodableType averageWearCount = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; diff --git a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h index d6685e05984fe9..5ac798d47cade1 100644 --- a/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h +++ b/zzz_generated/app-common/app-common/zap-generated/ids/Attributes.h @@ -1324,10 +1324,6 @@ namespace TestEventTriggersEnabled { static constexpr AttributeId Id = 0x00000008; } // namespace TestEventTriggersEnabled -namespace AverageWearCount { -static constexpr AttributeId Id = 0x00000009; -} // namespace AverageWearCount - namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 4c0bc16b08b2eb..e930ca1aaf729d 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -3066,7 +3066,6 @@ class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand | * ActiveRadioFaults | 0x0006 | | * ActiveNetworkFaults | 0x0007 | | * TestEventTriggersEnabled | 0x0008 | -| * AverageWearCount | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -13520,7 +13519,6 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, credsIssuerConfig), // - make_unique(Id, "average-wear-count", Attributes::AverageWearCount::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // @@ -13551,8 +13549,6 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "test-event-triggers-enabled", 0, 1, Attributes::TestEventTriggersEnabled::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // - make_unique>(Id, "average-wear-count", 0, UINT32_MAX, Attributes::AverageWearCount::Id, - WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -13577,7 +13573,6 @@ void registerClusterGeneralDiagnostics(Commands & commands, CredentialIssuerComm make_unique(Id, "active-network-faults", Attributes::ActiveNetworkFaults::Id, credsIssuerConfig), // make_unique(Id, "test-event-triggers-enabled", Attributes::TestEventTriggersEnabled::Id, credsIssuerConfig), // - make_unique(Id, "average-wear-count", Attributes::AverageWearCount::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // make_unique(Id, "accepted-command-list", Attributes::AcceptedCommandList::Id, credsIssuerConfig), // make_unique(Id, "event-list", Attributes::EventList::Id, credsIssuerConfig), // diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index b745371e19bc0f..449a3e161f6246 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -6655,11 +6655,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("TestEventTriggersEnabled", 1, value); } - case GeneralDiagnostics::Attributes::AverageWearCount::Id: { - uint32_t value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AverageWearCount", 1, value); - } case GeneralDiagnostics::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 3f4f06d132adc5..8f13baa8c692a8 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -27953,7 +27953,6 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut | * ActiveRadioFaults | 0x0006 | | * ActiveNetworkFaults | 0x0007 | | * TestEventTriggersEnabled | 0x0008 | -| * AverageWearCount | 0x0009 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -28808,92 +28807,6 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs } }; -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute AverageWearCount - */ -class ReadGeneralDiagnosticsAverageWearCount : public ReadAttribute { -public: - ReadGeneralDiagnosticsAverageWearCount() - : ReadAttribute("average-wear-count") - { - } - - ~ReadGeneralDiagnosticsAverageWearCount() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AverageWearCount::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAverageWearCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AverageWearCount response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("GeneralDiagnostics AverageWearCount read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeGeneralDiagnosticsAverageWearCount : public SubscribeAttribute { -public: - SubscribeAttributeGeneralDiagnosticsAverageWearCount() - : SubscribeAttribute("average-wear-count") - { - } - - ~SubscribeAttributeGeneralDiagnosticsAverageWearCount() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AverageWearCount::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[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 subscribeAttributeAverageWearCountWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AverageWearCount response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ @@ -155691,10 +155604,6 @@ void registerClusterGeneralDiagnostics(Commands & commands) make_unique(), // make_unique(), // make_unique(), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), //