From 2618050540fe08eeb61a8baba653008a8df03760 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 13 Jun 2023 11:10:58 -0400 Subject: [PATCH] Mark DishwasherControls as provisional on Darwin for now. (#27136) Waiting for API to stabilize. --- .../CHIP/templates/availability.yaml | 1 + .../MTRAttributeSpecifiedCheck.mm | 42 - .../MTRAttributeTLVValueDecoder.mm | 214 ----- .../CHIP/zap-generated/MTRBaseClusters.h | 153 ---- .../CHIP/zap-generated/MTRBaseClusters.mm | 537 ----------- .../zap-generated/MTRBaseClusters_Internal.h | 5 - .../CHIP/zap-generated/MTRCallbackBridge.h | 172 ---- .../CHIP/zap-generated/MTRCallbackBridge.mm | 195 ---- .../CHIP/zap-generated/MTRClusterConstants.h | 18 - .../CHIP/zap-generated/MTRClusters.h | 47 - .../CHIP/zap-generated/MTRClusters.mm | 135 --- .../CHIP/zap-generated/MTRClusters_Internal.h | 5 - .../zap-generated/MTREventTLVValueDecoder.mm | 15 - .../zap-generated/cluster/Commands.h | 838 ------------------ 14 files changed, 1 insertion(+), 2376 deletions(-) diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 0985476fc30aaa..331b3c09ebcd15 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -8399,6 +8399,7 @@ - RVCRunModeSelect - RVCCleanModeSelect - DishwasherModeSelect + - WasherControls commands: ModeSelect: # Still very in-flux. diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index c0e791161f6cbe..0920c65ca69499 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -1802,45 +1802,6 @@ static BOOL AttributeIsSpecifiedInModeSelectCluster(AttributeId aAttributeId) } } } -static BOOL AttributeIsSpecifiedInWasherControlsCluster(AttributeId aAttributeId) -{ - using namespace Clusters::WasherControls; - switch (aAttributeId) { - case Attributes::SpinSpeeds::Id: { - return YES; - } - case Attributes::SpinSpeedCurrent::Id: { - return YES; - } - case Attributes::NumberOfRinses::Id: { - return YES; - } - case Attributes::MaxRinses::Id: { - return YES; - } - case Attributes::GeneratedCommandList::Id: { - return YES; - } - case Attributes::AcceptedCommandList::Id: { - return YES; - } - case Attributes::EventList::Id: { - return YES; - } - case Attributes::AttributeList::Id: { - return YES; - } - case Attributes::FeatureMap::Id: { - return YES; - } - case Attributes::ClusterRevision::Id: { - return YES; - } - default: { - return NO; - } - } -} static BOOL AttributeIsSpecifiedInTemperatureControlCluster(AttributeId aAttributeId) { using namespace Clusters::TemperatureControl; @@ -5124,9 +5085,6 @@ BOOL MTRAttributeIsSpecified(ClusterId aClusterId, AttributeId aAttributeId) case Clusters::ModeSelect::Id: { return AttributeIsSpecifiedInModeSelectCluster(aAttributeId); } - case Clusters::WasherControls::Id: { - return AttributeIsSpecifiedInWasherControlsCluster(aAttributeId); - } case Clusters::TemperatureControl::Id: { return AttributeIsSpecifiedInTemperatureControlCluster(aAttributeId); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 61268ed2e1cb85..4d7cbd75eab3d6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -9254,217 +9254,6 @@ static id _Nullable DecodeAttributeValueForModeSelectCluster( *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; return nil; } -static id _Nullable DecodeAttributeValueForWasherControlsCluster( - AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::WasherControls; - switch (aAttributeId) { - case Attributes::SpinSpeeds::Id: { - using TypeInfo = Attributes::SpinSpeeds::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(); - NSString * newElement_0; - newElement_0 = AsString(entry_0); - if (newElement_0 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - *aError = err; - return 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::SpinSpeedCurrent::Id: { - using TypeInfo = Attributes::SpinSpeedCurrent::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::NumberOfRinses::Id: { - using TypeInfo = Attributes::NumberOfRinses::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::MaxRinses::Id: { - using TypeInfo = Attributes::MaxRinses::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: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_ATTRIBUTE_PATH_IB; - return nil; -} static id _Nullable DecodeAttributeValueForTemperatureControlCluster( AttributeId aAttributeId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { @@ -24484,9 +24273,6 @@ id _Nullable MTRDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::T case Clusters::ModeSelect::Id: { return DecodeAttributeValueForModeSelectCluster(aPath.mAttributeId, aReader, aError); } - case Clusters::WasherControls::Id: { - return DecodeAttributeValueForWasherControlsCluster(aPath.mAttributeId, aReader, aError); - } case Clusters::TemperatureControl::Id: { return DecodeAttributeValueForTemperatureControlCluster(aPath.mAttributeId, aReader, aError); } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 2df5bd7534052f..599499f005e8a3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -7900,154 +7900,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Washer Controls - * - * This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, such - * as a washing machine. - */ -MTR_NEWLY_AVAILABLE -@interface MTRBaseClusterWasherControls : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable)value - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable)value - params:(MTRWriteParams * _Nullable)params - completion:(MTRStatusCompletion)completion MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeMaxRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeMaxRinsesWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeMaxRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))reportHandler MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion - MTR_NEWLY_AVAILABLE; -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler - MTR_NEWLY_AVAILABLE; -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSNumber * _Nullable value, - NSError * _Nullable error))completion MTR_NEWLY_AVAILABLE; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - /** * Cluster Temperature Control * @@ -24500,11 +24352,6 @@ typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint32_t, MTRWasherControlsFeature) { - MTRWasherControlsFeatureSpin MTR_NEWLY_AVAILABLE = 0x1, - MTRWasherControlsFeatureRinse MTR_NEWLY_AVAILABLE = 0x2, -} MTR_NEWLY_AVAILABLE; - typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { MTRTemperatureControlFeatureTemperatureNumber MTR_NEWLY_AVAILABLE = 0x1, MTRTemperatureControlFeatureTemperatureLevel MTR_NEWLY_AVAILABLE = 0x2, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 9ced20af36bc97..cdf9f56791411a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -47834,543 +47834,6 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device endpoint:(uint16 @end -@implementation MTRBaseClusterWasherControls - -- (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)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WasherControls::Attributes::SpinSpeeds::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WasherControls::Attributes::SpinSpeeds::TypeInfo; - MTRSubscribeAttribute( - params, subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer - endpoint:(NSNumber *)endpoint - queue:(dispatch_queue_t)queue - completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - auto * bridge = new MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WasherControlsSpinSpeedsListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WasherControls::Attributes::SpinSpeeds::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)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeSpinSpeedCurrentWithValue:(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 = WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WasherControls::Attributes::SpinSpeedCurrent::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(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 = WasherControls::Attributes::SpinSpeedCurrent::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)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WasherControls::Attributes::NumberOfRinses::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeNumberOfRinsesWithValue:(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 = WasherControls::Attributes::NumberOfRinses::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self->_endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); - }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WasherControls::Attributes::NumberOfRinses::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeNumberOfRinsesWithClusterStateCache:(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 = WasherControls::Attributes::NumberOfRinses::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)readAttributeMaxRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - MTRReadParams * params = [[MTRReadParams alloc] init]; - using TypeInfo = WasherControls::Attributes::MaxRinses::TypeInfo; - return MTRReadAttribute( - params, completion, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), TypeInfo::GetAttributeId()); -} - -- (void)subscribeAttributeMaxRinsesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WasherControls::Attributes::MaxRinses::TypeInfo; - MTRSubscribeAttribute(params, - subscriptionEstablished, reportHandler, self.callbackQueue, self.device, self->_endpoint, TypeInfo::GetClusterId(), - TypeInfo::GetAttributeId()); -} - -+ (void)readAttributeMaxRinsesWithClusterStateCache:(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 = WasherControls::Attributes::MaxRinses::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 = WasherControls::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 = WasherControls::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 MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WasherControlsGeneratedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WasherControls::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 = WasherControls::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 = WasherControls::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 MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WasherControlsAcceptedCommandListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WasherControls::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 = WasherControls::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 = WasherControls::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 MTRWasherControlsEventListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WasherControlsEventListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WasherControls::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 = WasherControls::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 = WasherControls::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 MTRWasherControlsAttributeListListAttributeCallbackBridge(queue, completion); - std::move(*bridge).DispatchLocalAction(clusterStateCacheContainer.baseDevice, - ^(WasherControlsAttributeListListAttributeCallback successCb, MTRErrorCallback failureCb) { - if (clusterStateCacheContainer.cppClusterStateCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = WasherControls::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 = WasherControls::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 = WasherControls::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 = WasherControls::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 = WasherControls::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 = WasherControls::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 = WasherControls::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 MTRBaseClusterTemperatureControl - (instancetype)initWithDevice:(MTRBaseDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h index 1762a850666cb1..1063a353250da9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters_Internal.h @@ -200,11 +200,6 @@ @property (nonatomic, assign, readonly) chip::EndpointId endpoint; @end -@interface MTRBaseClusterWasherControls () -@property (nonatomic, strong, readonly) MTRBaseDevice * device; -@property (nonatomic, assign, readonly) chip::EndpointId endpoint; -@end - @interface MTRBaseClusterTemperatureControl () @property (nonatomic, strong, readonly) MTRBaseDevice * device; @property (nonatomic, assign, readonly) chip::EndpointId endpoint; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h index b6c627eb5c2b2e..e239e1f9d503eb 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.h @@ -1167,16 +1167,6 @@ typedef void (*ModeSelectEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ModeSelectAttributeListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsSpinSpeedsListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsGeneratedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsAcceptedCommandListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsEventListListAttributeCallback)(void * context, - const chip::app::DataModel::DecodableList & data); -typedef void (*WasherControlsAttributeListListAttributeCallback)( - void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlSupportedTemperatureLevelsListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*TemperatureControlGeneratedCommandListListAttributeCallback)( @@ -8719,168 +8709,6 @@ class MTRModeSelectAttributeListListAttributeCallbackSubscriptionBridge MTRSubscriptionEstablishedHandler mEstablishedHandler; }; -class MTRWasherControlsSpinSpeedsListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(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 MTRWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge - : public MTRWasherControlsSpinSpeedsListAttributeCallbackBridge -{ -public: - MTRWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWasherControlsSpinSpeedsListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWasherControlsSpinSpeedsListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWasherControlsSpinSpeedsListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(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 MTRWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge -{ -public: - MTRWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(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 MTRWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge - : public MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge -{ -public: - MTRWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge( - dispatch_queue_t queue, ResponseHandler handler, MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRWasherControlsEventListListAttributeCallbackBridge : public MTRCallbackBridge -{ -public: - MTRWasherControlsEventListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWasherControlsEventListListAttributeCallbackBridge(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 MTRWasherControlsEventListListAttributeCallbackSubscriptionBridge - : public MTRWasherControlsEventListListAttributeCallbackBridge -{ -public: - MTRWasherControlsEventListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWasherControlsEventListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWasherControlsEventListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWasherControlsEventListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - -class MTRWasherControlsAttributeListListAttributeCallbackBridge - : public MTRCallbackBridge -{ -public: - MTRWasherControlsAttributeListListAttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler) : - MTRCallbackBridge(queue, handler, OnSuccessFn){}; - - MTRWasherControlsAttributeListListAttributeCallbackBridge(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 MTRWasherControlsAttributeListListAttributeCallbackSubscriptionBridge - : public MTRWasherControlsAttributeListListAttributeCallbackBridge -{ -public: - MTRWasherControlsAttributeListListAttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, - MTRActionBlock action, - MTRSubscriptionEstablishedHandler establishedHandler) : - MTRWasherControlsAttributeListListAttributeCallbackBridge(queue, handler, action), - mEstablishedHandler(establishedHandler) - {} - - void OnSubscriptionEstablished(); - using MTRWasherControlsAttributeListListAttributeCallbackBridge::KeepAliveOnCallback; - using MTRWasherControlsAttributeListListAttributeCallbackBridge::OnDone; - -private: - MTRSubscriptionEstablishedHandler mEstablishedHandler; -}; - class MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge : public MTRCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index 0cd0c5b5e2f1fd..41a77955b9d517 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -8209,201 +8209,6 @@ } } -void MTRWasherControlsSpinSpeedsListAttributeCallbackBridge::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 = AsString(entry_0); - if (newElement_0 == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - OnFailureFn(context, err); - return; - } - [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 MTRWasherControlsSpinSpeedsListAttributeCallbackSubscriptionBridge::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 MTRWasherControlsGeneratedCommandListListAttributeCallbackBridge::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 MTRWasherControlsGeneratedCommandListListAttributeCallbackSubscriptionBridge::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 MTRWasherControlsAcceptedCommandListListAttributeCallbackBridge::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 MTRWasherControlsAcceptedCommandListListAttributeCallbackSubscriptionBridge::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 MTRWasherControlsEventListListAttributeCallbackBridge::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 MTRWasherControlsEventListListAttributeCallbackSubscriptionBridge::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 MTRWasherControlsAttributeListListAttributeCallbackBridge::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 MTRWasherControlsAttributeListListAttributeCallbackSubscriptionBridge::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 MTRTemperatureControlSupportedTemperatureLevelsListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 4ea8243e489b13..0e06ba47e07b3f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -276,7 +276,6 @@ typedef NS_ENUM(uint32_t, MTRClusterIDType) { MTRClusterIDTypeProxyValidID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000044, MTRClusterIDTypeBooleanStateID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, MTRClusterIDTypeModeSelectID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000050, - MTRClusterIDTypeWasherControlsID MTR_NEWLY_AVAILABLE = 0x00000053, MTRClusterIDTypeTemperatureControlID MTR_NEWLY_AVAILABLE = 0x00000056, MTRClusterIDTypeRefrigeratorAlarmID MTR_NEWLY_AVAILABLE = 0x00000057, MTRClusterIDTypeAirQualityID MTR_NEWLY_AVAILABLE = 0x0000005B, @@ -3733,23 +3732,6 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterModeSelectAttributeClusterRevisionID API_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster WasherControls attributes - MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedsID MTR_NEWLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedCurrentID MTR_NEWLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterWasherControlsAttributeNumberOfRinsesID MTR_NEWLY_AVAILABLE = 0x00000002, - MTRAttributeIDTypeClusterWasherControlsAttributeMaxRinsesID MTR_NEWLY_AVAILABLE = 0x00000003, - MTRAttributeIDTypeClusterWasherControlsAttributeGeneratedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, - MTRAttributeIDTypeClusterWasherControlsAttributeAcceptedCommandListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, - MTRAttributeIDTypeClusterWasherControlsAttributeEventListID MTR_NEWLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, - MTRAttributeIDTypeClusterWasherControlsAttributeAttributeListID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeAttributeListID, - MTRAttributeIDTypeClusterWasherControlsAttributeFeatureMapID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeFeatureMapID, - MTRAttributeIDTypeClusterWasherControlsAttributeClusterRevisionID MTR_NEWLY_AVAILABLE - = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, - // Cluster TemperatureControl attributes MTRAttributeIDTypeClusterTemperatureControlAttributeTemperatureSetpointID MTR_NEWLY_AVAILABLE = 0x00000000, MTRAttributeIDTypeClusterTemperatureControlAttributeMinTemperatureID MTR_NEWLY_AVAILABLE = 0x00000001, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index b2a6c9fd9d8cc3..dcc4a1916f0fe1 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -2803,53 +2803,6 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @end -/** - * Cluster Washer Controls - * This cluster supports remotely monitoring and controling the different typs of functionality available to a washing device, - * such as a washing machine. - */ -MTR_NEWLY_AVAILABLE -@interface MTRClusterWasherControls : MTRCluster - -- (instancetype _Nullable)initWithDevice:(MTRDevice *)device - endpointID:(NSNumber *)endpointID - queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_NEWLY_AVAILABLE; -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeMaxRinsesWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params MTR_NEWLY_AVAILABLE; - -- (instancetype)init NS_UNAVAILABLE; -+ (instancetype)new NS_UNAVAILABLE; - -@end - /** * Cluster Temperature Control * Attributes and commands for configuring the temperature control, and reporting temperature. diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index eb7ecf7f32f731..2f1684e89b3480 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -12894,141 +12894,6 @@ - (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params } @end -@implementation MTRClusterWasherControls - -- (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 *)readAttributeSpinSpeedsWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedsID) - params:params]; -} - -- (NSDictionary *)readAttributeSpinSpeedCurrentWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedCurrentID) - params:params]; -} - -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeSpinSpeedCurrentWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeSpinSpeedCurrentID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeNumberOfRinsesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeNumberOfRinsesID) - params:params]; -} - -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs -{ - [self writeAttributeNumberOfRinsesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; -} -- (void)writeAttributeNumberOfRinsesWithValue:(NSDictionary *)dataValueDictionary - expectedValueInterval:(NSNumber *)expectedValueIntervalMs - params:(MTRWriteParams * _Nullable)params -{ - NSNumber * timedWriteTimeout = params.timedWriteTimeout; - - [self.device writeAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeNumberOfRinsesID) - value:dataValueDictionary - expectedValueInterval:expectedValueIntervalMs - timedWriteTimeout:timedWriteTimeout]; -} - -- (NSDictionary *)readAttributeMaxRinsesWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeMaxRinsesID) - params:params]; -} - -- (NSDictionary *)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeGeneratedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeAcceptedCommandListID) - params:params]; -} - -- (NSDictionary *)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeEventListID) - params:params]; -} - -- (NSDictionary *)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeAttributeListID) - params:params]; -} - -- (NSDictionary *)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeFeatureMapID) - params:params]; -} - -- (NSDictionary *)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(_endpoint) - clusterID:@(MTRClusterIDTypeWasherControlsID) - attributeID:@(MTRAttributeIDTypeClusterWasherControlsAttributeClusterRevisionID) - params:params]; -} - -@end - @implementation MTRClusterTemperatureControl - (instancetype)initWithDevice:(MTRDevice *)device endpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h index 0bdadb00fa1abd..8c738156db2ce6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters_Internal.h @@ -201,11 +201,6 @@ @property (nonatomic, readonly) MTRDevice * device; @end -@interface MTRClusterWasherControls () -@property (nonatomic, readonly) uint16_t endpoint; -@property (nonatomic, readonly) MTRDevice * device; -@end - @interface MTRClusterTemperatureControl () @property (nonatomic, readonly) uint16_t endpoint; @property (nonatomic, readonly) MTRDevice * device; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index b6c8a883439ff0..d02da1d9f29b48 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -1554,18 +1554,6 @@ static id _Nullable DecodeEventPayloadForModeSelectCluster(EventId aEventId, TLV *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; return nil; } -static id _Nullable DecodeEventPayloadForWasherControlsCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) -{ - using namespace Clusters::WasherControls; - switch (aEventId) { - default: { - break; - } - } - - *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; - return nil; -} static id _Nullable DecodeEventPayloadForTemperatureControlCluster(EventId aEventId, TLV::TLVReader & aReader, CHIP_ERROR * aError) { using namespace Clusters::TemperatureControl; @@ -3047,9 +3035,6 @@ id _Nullable MTRDecodeEventPayload(const ConcreteEventPath & aPath, TLV::TLVRead case Clusters::ModeSelect::Id: { return DecodeEventPayloadForModeSelectCluster(aPath.mEventId, aReader, aError); } - case Clusters::WasherControls::Id: { - return DecodeEventPayloadForWasherControlsCluster(aPath.mEventId, aReader, aError); - } case Clusters::TemperatureControl::Id: { return DecodeEventPayloadForTemperatureControlCluster(aPath.mEventId, aReader, aError); } 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 79026401eac004..b30091d2b0e58e 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -40594,806 +40594,6 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster WasherControls | 0x0053 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SpinSpeeds | 0x0000 | -| * SpinSpeedCurrent | 0x0001 | -| * NumberOfRinses | 0x0002 | -| * MaxRinses | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Attribute SpinSpeeds - */ -class ReadWasherControlsSpinSpeeds : public ReadAttribute { -public: - ReadWasherControlsSpinSpeeds() - : ReadAttribute("spin-speeds") - { - } - - ~ReadWasherControlsSpinSpeeds() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000000) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.SpinSpeeds response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls SpinSpeeds read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsSpinSpeeds : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsSpinSpeeds() - : SubscribeAttribute("spin-speeds") - { - } - - ~SubscribeAttributeWasherControlsSpinSpeeds() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000000) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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 subscribeAttributeSpinSpeedsWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.SpinSpeeds response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute SpinSpeedCurrent - */ -class ReadWasherControlsSpinSpeedCurrent : public ReadAttribute { -public: - ReadWasherControlsSpinSpeedCurrent() - : ReadAttribute("spin-speed-current") - { - } - - ~ReadWasherControlsSpinSpeedCurrent() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000001) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeSpinSpeedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.SpinSpeedCurrent response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls SpinSpeedCurrent read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteWasherControlsSpinSpeedCurrent : public WriteAttribute { -public: - WriteWasherControlsSpinSpeedCurrent() - : WriteAttribute("spin-speed-current") - { - AddArgument("attr-name", "spin-speed-current"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWasherControlsSpinSpeedCurrent() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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 writeAttributeSpinSpeedCurrentWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WasherControls SpinSpeedCurrent write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeWasherControlsSpinSpeedCurrent : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsSpinSpeedCurrent() - : SubscribeAttribute("spin-speed-current") - { - } - - ~SubscribeAttributeWasherControlsSpinSpeedCurrent() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000001) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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 subscribeAttributeSpinSpeedCurrentWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.SpinSpeedCurrent response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute NumberOfRinses - */ -class ReadWasherControlsNumberOfRinses : public ReadAttribute { -public: - ReadWasherControlsNumberOfRinses() - : ReadAttribute("number-of-rinses") - { - } - - ~ReadWasherControlsNumberOfRinses() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000002) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeNumberOfRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.NumberOfRinses response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls NumberOfRinses read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteWasherControlsNumberOfRinses : public WriteAttribute { -public: - WriteWasherControlsNumberOfRinses() - : WriteAttribute("number-of-rinses") - { - AddArgument("attr-name", "number-of-rinses"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteWasherControlsNumberOfRinses() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) WriteAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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 writeAttributeNumberOfRinsesWithValue:value - params:params - completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("WasherControls NumberOfRinses write Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeWasherControlsNumberOfRinses : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsNumberOfRinses() - : SubscribeAttribute("number-of-rinses") - { - } - - ~SubscribeAttributeWasherControlsNumberOfRinses() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000002) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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 subscribeAttributeNumberOfRinsesWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.NumberOfRinses response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute MaxRinses - */ -class ReadWasherControlsMaxRinses : public ReadAttribute { -public: - ReadWasherControlsMaxRinses() - : ReadAttribute("max-rinses") - { - } - - ~ReadWasherControlsMaxRinses() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x00000003) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeMaxRinsesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.MaxRinses response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls MaxRinses read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsMaxRinses : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsMaxRinses() - : SubscribeAttribute("max-rinses") - { - } - - ~SubscribeAttributeWasherControlsMaxRinses() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x00000003) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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 subscribeAttributeMaxRinsesWithParams:params - subscriptionEstablished:^() { - mSubscriptionEstablished = YES; - } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.MaxRinses response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute GeneratedCommandList - */ -class ReadWasherControlsGeneratedCommandList : public ReadAttribute { -public: - ReadWasherControlsGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadWasherControlsGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF8) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.GeneratedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls GeneratedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeWasherControlsGeneratedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF8) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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(@"WasherControls.GeneratedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AcceptedCommandList - */ -class ReadWasherControlsAcceptedCommandList : public ReadAttribute { -public: - ReadWasherControlsAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadWasherControlsAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFF9) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.AcceptedCommandList response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls AcceptedCommandList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeWasherControlsAcceptedCommandList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFF9) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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(@"WasherControls.AcceptedCommandList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute EventList - */ -class ReadWasherControlsEventList : public ReadAttribute { -public: - ReadWasherControlsEventList() - : ReadAttribute("event-list") - { - } - - ~ReadWasherControlsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFA) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.EventList response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls EventList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsEventList : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeWasherControlsEventList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFA) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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(@"WasherControls.EventList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute AttributeList - */ -class ReadWasherControlsAttributeList : public ReadAttribute { -public: - ReadWasherControlsAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadWasherControlsAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFB) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.AttributeList response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls AttributeList read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeWasherControlsAttributeList() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFB) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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(@"WasherControls.AttributeList response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute FeatureMap - */ -class ReadWasherControlsFeatureMap : public ReadAttribute { -public: - ReadWasherControlsFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadWasherControlsFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFC) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.FeatureMap response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls FeatureMap read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeWasherControlsFeatureMap() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFC) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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(@"WasherControls.FeatureMap response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -/* - * Attribute ClusterRevision - */ -class ReadWasherControlsClusterRevision : public ReadAttribute { -public: - ReadWasherControlsClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadWasherControlsClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReadAttribute (0x0000FFFD) on endpoint %u", endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls alloc] initWithDevice:device - endpointID:@(endpointId) - queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WasherControls.ClusterRevision response %@", [value description]); - if (error != nil) { - LogNSError("WasherControls ClusterRevision read Error", error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeWasherControlsClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeWasherControlsClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeWasherControlsClusterRevision() {} - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - ChipLogProgress(chipTool, "Sending cluster (0x00000053) ReportAttribute (0x0000FFFD) on endpoint %u", endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWasherControls 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(@"WasherControls.ClusterRevision response %@", [value description]); - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - /*----------------------------------------------------------------------------*\ | Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| @@ -123193,43 +122393,6 @@ void registerClusterModeSelect(Commands & commands) commands.Register(clusterName, clusterCommands); } -void registerClusterWasherControls(Commands & commands) -{ - using namespace chip::app::Clusters::WasherControls; - - const char * clusterName = "WasherControls"; - - 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(), // - 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 registerClusterTemperatureControl(Commands & commands) { using namespace chip::app::Clusters::TemperatureControl; @@ -126133,7 +125296,6 @@ void registerClusters(Commands & commands) registerClusterUserLabel(commands); registerClusterBooleanState(commands); registerClusterModeSelect(commands); - registerClusterWasherControls(commands); registerClusterTemperatureControl(commands); registerClusterRefrigeratorAlarm(commands); registerClusterAirQuality(commands);